developer:soap-1.1:methods:copycustomer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
developer:soap-1.1:methods:copycustomer [2009/06/24 13:52]
charlie created
developer:soap-1.1:methods:copycustomer [2010/10/21 16:13]
irina
Line 27: Line 27:
 ===== Examples ===== ===== Examples =====
  
 +==== .NET VB ====
 +<code 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)
 +
 +</​code>​
 +
 +==== .NET C# ====
 +<code 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);​
 +            }
 +</​code>​
developer/soap-1.1/methods/copycustomer.txt ยท Last modified: 2010/10/21 16:13 by irina

Page Tools