developer:soap-1.6:methods:savecard

Soap API v1.6

saveCard

Save a card

Description

Syntax

CreditCardToken saveCard ( ueSecurityToken Token, CreditCardData CreditCardData )

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
CreditCardData CreditCardData Object containing credit card data.

Return Value

CreditCardToken Returns object containing card token data (including card ref)

Examples

PHP

For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.

<?php 
 
try { 
 
    $CreditCardData => array( 
      'CardNumber' => '4444555566667779', 
      'CardExpiration' => '0909', 
      'CardCode' => '999' 
      ) 
    ); 
 
  $token=$client->saveCard($token, $CreditCardData); 
 
 
} 
 
catch (SoapFault $e) { 
  die("saveCard failed :" .$e->getMessage()); 
} 
 
?>

C# (.Net)

private void btnruntransaction_Click(object sender, EventArgs e)
        {
            usaepay.usaepayService client = getClient();
            usaepay.ueSecurityToken token = getToken();
 
 
            usaepay.CreditCardData card = new usaepay.CreditCardData();
            card.CardNumber = "4444555566667779";
            card.CardExpiration = "0914";
 
            usaepay.CreditCardToken cctoken = new usaepay.CreditCardToken();
 
            try
            {
                cctoken = client.saveCard(token, card);
 
 
                    MessageBox.Show(string.Concat("Card Saved: ",cctoken.CardRef));
 
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
 
 
        }

XML

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:ns1="urn:usaepay" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
   SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:saveCard>
<Token xsi:type="ns1:ueSecurityToken">
<ClientIP xsi:type="xsd:string">192.168.0.1</ClientIP>
<PinHash xsi:type="ns1:ueHash">
<HashValue xsi:type="xsd:string">da4f177fb82a516da7b93cd725c0ac0fbead2ef4</HashValue>
<Seed xsi:type="xsd:string">13413324111907933573</Seed>
<Type xsi:type="xsd:string">sha1</Type>
</PinHash>
<SourceKey xsi:type="xsd:string">_Ss7g8t6UW9b1Py6474F5Z1A8fmo22x2</SourceKey>
</Token>
<CreditCardData xsi:type="ns1:CreditCardData">
<CardExpiration xsi:type="xsd:string">2013-02</CardExpiration>
<CardNumber xsi:type="xsd:string">4444-5555-6666-7779</CardNumber>
</CreditCardData>
</ns1:saveCard>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Change History

Version Change
1.6 Method added in soap-1.6
developer/soap-1.6/methods/savecard.txt · Last modified: 2014/01/23 17:04 by yura

Page Tools