Copy customer from one merchant to another.
This method allows you to copy a customer record from one merchant to another. This method is only available to merchants who have a master user setup to access both accounts.
CustNum copyCustomer ( ueSecurityToken FromToken, integer CustNum, ueSecurityToken ToToken)
Type | Name | Description |
---|---|---|
ueSecurityToken | FromToken | Merchant security token: used to identify the merchant that the customer is being copied from. |
integer | CustNum | The gateway assigned customer number for the the customer to be copied. |
ueSecurityToken | ToToken | Merchant security token: used to identify the merchant that the customer is being copied to. |
Integer | Returns gateway assigned Customer Number of the new customer. |
For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.
<?php try { // CustNum for Customer to Copy $CustNum="12345678"; // $toMerchToken is setup with sourcekey // for merchant being copied to $NewCustNum=$client->copyCustomer($token, $CustNum,$toMerchToken); } catch(Exception $e) { echo 'Error: ' . $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 { //CusNum From Customer to copy BigInteger CustNum = BigInteger("12345678"); // toMerchToken is the token setup with a source key // for the merchant being copied to. BigInteger NewCustNum = client.copyCustomer(token, CustNum, toMerchToken); } catch (Exception e) { System.out.println("Soap Exception: " + e.getMessage()); }