developer:soap:methods:getcustomerpaymentmethod

This is an old revision of the document!


Soap API v1.2

getCustomerPaymentMethod

Retrieve a specific customer payment method for a given CustNum.

Description

This method allows you to retrieve a specific payment method 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.

You must also specify the MethodID for the desired Payment Method. This MethodID is assigned by the gateway and returned by addCustomerPaymentMethod. You can also obtain the methodid from the MethodID property of the PaymentMethod object. This is returned by either getCustomer or getCustomerPaymentMethods.

See also getCustomer and getCustomerPaymentMethods

Syntax

PaymentMethod getCustomerPaymentMethod ( ueSecurityToken Token, integer CustNum, integer MethodID )

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
integer CustNum Unique customer ID number assigned by the gateway.
integer MethodID Unique payment method ID assigned by the gateway.

Return Value

PaymentMethod Returns a PaymentMethod object

Examples

PHP

For directions on how to set up the WSDL link, create “$token” and “$client” please see the SOAP PHP Howto.

<?php 
try { 
 
   $custnum = '532'; 
   $methodid = '1234';
   $paymethod = $client->getCustomerPaymentMethod($token,$custnum,$methodid); 
 
   print_r($paymethod);
 
   echo $paymethod->MethodName . "\n";
 
} catch(SoapFault $e) { 
 
     echo $e->getMessage(); 
     echo "\n\nRequest: " . $client->__getLastRequest(); 
     echo "\n\nResponse: " . $client->__getLastResponse(); 
} 
 
?> 

Change History

Version Change
1.2 The getPaymentMethod method was added in release 1.2
developer/soap/methods/getcustomerpaymentmethod.1248421458.txt.gz · Last modified: 2009/07/24 00:44 by tem

Page Tools