This method allows you to update an existing payment method for a customer.
Updates the existing payment method. PaymentMethod.MethodID is used to determine which payment method to update.
See also runCustomerTransaction, enableCustomer, disableCustomer, deleteCustomer, searchCustomerID, getCustomer, searchCustomers, getCustomerHistory, addCustomer, deleteCustomerPaymentMethod, updateCustomer, quickUpdateCustomer
integer updateCustomerPaymentMethod ( ueSecurityToken Token,PaymentMethod PaymentMethod, boolean Verify )
Type | Name | Description |
---|---|---|
ueSecurityToken | Token | Merchant security token: used to identify merchant and validate transaction. |
PaymentMethod | PaymentMethod | Includes method name, description, ID, and expiration date. |
boolean | Verify | If set to true, an AuthOnly verification of the credit card validity will be run. (See above.) |
boolean | Returns true if payment method is updated successfully. |
For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.
<?php try { $CustNum='586'; $PaymentMethod=array( 'MethodID' => '0', 'MethodName'=>'Example', 'Expires'=>'0909', 'CreditCardData' => array( 'CardNumber'=>'4444555566667779', 'CardExpiration'=>'0908', 'CardType'=>'', 'CardCode'=>'', 'AvsStreet'=>'', 'AvsZip'=>'', 'CardPresent'=>'', 'MagStripe'=>'', 'TermType'=>'', 'MagSupport'=>'', 'XID'=>'', 'CAVV'=>'', 'ECI'=>'', 'InternalCardAuth'=>'', 'Pares'=>'' ), 'CheckData'=>array( 'CheckNumber'=>'', 'Routing'=>'', 'Account'=>'', 'SSN'=>'', 'DriversLicense'=>'', 'DriversLicenseState'=>'' ), 'SecondarySort'=>0 ); $Default=true; $Verify=true; $res=$client->addCustomerPaymentMethod($token,$CustNum, $PaymentMethod, $Default, $Verify); $this->assertTrue($res>0, 'Positive PaymentMethodID'); print_r($res); } catch(SoapFault $e) { echo "\n\nResponse: " . $tran->__getLastResponse(); die("soap fault: " .$e->getMessage()); echo "SoapFault: " .$e->getMessage(); print_r($e); echo "\n\nRequest: " . $tran->__getLastRequest(); } ?>
Dim method As usaepay.PaymentMethod = New usaepay.PaymentMethod method.MethodID = "72" method.MethodName = "My different" method.CreditCardData = New usaepay.CreditCardData method.CreditCardData.CardExpiration = "1212" method.CreditCardData.CardNumber = "4444555566667779" Dim verify As Boolean verify = True Dim response As Boolean response = client.updateCustomerPaymentMethod(token, method, verify) MessageBox.Show(String.Concat(response))
usaepay.PaymentMethod method = new usaepay.PaymentMethod(); method.MethodID = "29"; method.MethodName = "My different"; method.CreditCardData = new usaepay.CreditCardData(); method.CreditCardData.CardExpiration = "1212"; method.CreditCardData.CardNumber = "4444555566667779"; Boolean verify = true; Boolean response; try { response = client.updateCustomerPaymentMethod(token, method, verify); MessageBox.Show(string.Concat(response)); } catch (Exception err) { MessageBox.Show(err.Message); }
Version | Change |
---|---|
1.2 | Method added. |