Retrieve the customer payment methods for a given CustNum.
This method allows you to retrieve all of the payment methods stored for a particular customer.
This method requires the use of the CustNum, a unique customer number assigned by the gateway. If you have lost or cannot remember the customer's CustNum, use the searchCustomers method to find the correct CustNum.
PaymentMethod getCustomerPaymentMethods ( ueSecurityToken Token, integer CustNum )
Type |
Name |
Description |
Token |
Merchant security token: used to identify merchant and validate transaction. |
|
integer |
CustNum |
Unique customer ID number assigned by the gateway. |
Returns Array of PaymentMethod objects. |
<?php
// for directions on how to set up the
// WSDL link and create "$token" and "$client,"
// see: http://eBizCharge.com/developer/howto/php.
try {
$custnum='532';
$paymethods = $client->getCustomerPaymentMethods($token,$custnum);
print_r($paymethods);
echo "Found " . count($paymethods) . " payment methods: \n";
foreach($paymethods as $paymethod)
{
echo $paymethod->MethodName . "\n";
}
} catch(SoapFault $e) {
echo $e->getMessage();
echo "\n\nRequest: " . $tran->__getLastRequest();
echo "\n\nResponse: " . $tran->__getLastResponse();
}
?>
Dim CustNum As String
CustNum = "103125"
Dim Method() As eBizCharge.PaymentMethod
Method = client.getCustomerPaymentMethods(token, CustNum)
MsgBox(Method.Length)
string CustNum = "89147";
try
{
eBizCharge.PaymentMethod[] Method = client.getCustomerPaymentMethods(token, CustNum);
MessageBox.Show(string.Concat(Method.Length));
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
try {
//Set custnum to the Customer Number of customer you want to
//retrieve payment methods from.
BigInteger custnum = new BigInteger;
PaymentMethodArray PaymentMethods = new PaymentMethodArray();
PaymentMethods = client.getCustomerPaymentMethods(token, custnum);
} catch (Exception e) {
System.out.println("Soap Exception: " + e.getMessage());
}