developer:soap-1.1:methods:copycustomer

copyCustomer

Copy customer from one merchant to another.

Description

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.

Syntax

CustNum copyCustomer ( ueSecurityToken FromToken, integer CustNum, ueSecurityToken ToToken)

Arguments

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.

Return Value

Integer Returns gateway assigned Customer Number of the new customer.

Examples

.NET VB

Dim client As usaepay.usaepayService = New usaepay.usaepayService
        Dim token1 As usaepay.ueSecurityToken
        Dim token2 As usaepay.ueSecurityToken
 
        token1 = Me.CreateToken("O_FIRST SOURCE KEY_8", "1234")
        token2 = Me.CreateToken("O_ SECOND SOURCE KEY_8", "1234")
 
        Dim custNum As String
        custNum = "120221"
        Dim NewCust As String
 
        NewCust = client.copyCustomer(token1, custNum, token2)
        MsgBox(NewCust)

.NET C#

usaepay.ueSecurityToken totoken = new usaepay.ueSecurityToken();
            usaepay.ueHash hash = new usaepay.ueHash();
            string sourcekey = "z*****************************************P";
            string pin = "1234";
            totoken.SourceKey = sourcekey;
 
            hash.Type = "md5";
            hash.Seed = Guid.NewGuid().ToString();
 
            string prehashvalue = string.Concat(totoken.SourceKey, hash.Seed, pin);
            hash.HashValue = GenerateHash(prehashvalue);
 
            totoken.PinHash = hash;
 
            string CustNum = "109100";
            string NewCust;
 
            try
            {
                NewCust = client.copyCustomer(token, CustNum, totoken);
                MessageBox.Show(string.Concat(NewCust));
            }
 
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
developer/soap-1.1/methods/copycustomer.txt · Last modified: 2010/10/21 16:13 by irina

Page Tools