Disable the recurring billing for a customer specified by CustNum.
This method allows you to stop a customer's recurring billing cycle using the CustNum (unique customer number assigned by the gateway) as a reference. If you have lost or cannot remember the customer's CustNum, use the searchCustomerID method to retrieve it.
You can resume a customer's recurring billing cycle at any time using the enableCustomer method.
See also runCustomerTransaction, enableCustomer, deleteCustomer, searchCustomerID, getCustomer, searchCustomers, getCustomerHistory, addCustomer, addCustomerPaymentMethod, deleteCustomerPaymentMethod, updateCustomer, quickUpdateCustomer
boolean disableCustomer ( ueSecurityToken Token, integer CustNum )
Type | Name | Description |
---|---|---|
ueSecurityToken | Token | Merchant security token: used to identify merchant and validate transaction. |
integer | CustNum | A unique customer number assigned by the gateway. |
boolean | Returns confirmation of the disable recurring billing request only if request is successful. If request fails, an exception will be thrown. |
For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.
<?php try { $custnum='56805'; print_r($client->disableCustomer($token,$custnum)); } catch(SoapFault $e) { echo $e->getMessage(); } ?>
This example uses the USAePay Java library. For directions on how to install the library and create the token/client objects, go to either the Java JAX-RPC Howto or the Java JAX-WS Howto.
try { //Set CustNum for the Customer that you want to disable BigInteger CustNum = new BigInteger("12345678"); client.disableCustomer(token, CustNum); } catch (Exception e) { System.out.println("Soap Exception: " + e.getMessage()); }
Dim custNum As String custNum = "103125" Dim response As Boolean response = client.disableCustomer(token, custNum) MsgBox(response)
For directions on how to set up the WSDL link and create the “token” and “client” variables, go to the C Sharp .Net Soap How-to.
string custNum = "89147"; Boolean response; try { response = client.deleteCustomer(token, custNum); if (response) { MessageBox.Show(string.Concat("Succesfull")); } } catch (Exception err) { MessageBox.Show(err.Message); }
Request:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:usaepay" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:disableCustomer> <Token xsi:type="ns1:ueSecurityToken"> <ClientIP xsi:type="xsd:string">123.123.123.123</ClientIP> <PinHash xsi:type="ns1:ueHash"> <HashValue xsi:type="xsd:string">029f32e4a817c9a0f307fa3a50ef126d79177409</HashValue> <Seed xsi:type="xsd:string">11652288220-test</Seed> <Type xsi:type="xsd:string">sha1</Type> </PinHash> <SourceKey xsi:type="xsd:string">_B4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey> </Token> <CustNum xsi:type="xsd:integer">4603339</CustNum> </ns1:disableCustomer> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:usaepay" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:disableCustomerResponse> <disableCustomerReturn xsi:type="xsd:boolean">true</disableCustomerReturn> </ns1:disableCustomerResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Version | Change |
---|---|
1.1 | Method added prior to soap-1.1 |