AddCard Method

 

Description

The AddCard method registers a new card and its details into the database.

Action

http://www.ecentricswitch.co.za/paymentgateway/v1/AddCard

Style

Document

Input (Literal)

The input of this method is the document element AddCardRequest having the structure defined by the following table.

 

ELEMENT

TYPE

SIZE(MAX)

DESCRIPTION

MessageHeader

 

 

MessageDateTime

datetime

The message timestamp.

MessageID

string

50

A unique identifier to identify the message.

Channel

string

50

An identifier to identify the source of the message

AddCardRequest
Required

 

 

MerchantID
Required

string

50

A unique identifier to identify the merchant's payment profile

MerchantUserID
Required

string

50

The merchant's identifier for the user

Card
Required

BankCard

The bank card definition for the card to be registered

 

 

Output (Literal)

The output of this method is the document element AddCardResponse having the structure defined by the following table.

 

ELEMENT

TYPE

SIZE(MAX)

DESCRIPTION

MessageHeader
Required

 

 

MessageDateTime

datetime

The message timestamp.

MessageID

string

50

A unique identifier to identify the message.

Channel

string

50

An identifier to identify the source of the message.

AddCardResponse
Required

 

 

Token
Required

string

A unique identifier to identify the stored card details

TransactionStatus
Required

TransactionStatusType

The transaction status (Success or Failure)

ResponseDetail
Required

ResponseDetail

The transaction result code.

Sample Messages

Request

<soapenv:Envelope
 	xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/""
 	xmlns:v1=""http://www.ecentricswitch.co.za/paymentgateway/v1"">
 	<soapenv:Header>
 		<v1:MessageHeader></v1:MessageHeader>
 	</soapenv:Header>
 	<soapenv:Body>
 		<AddCardRequest>
 		<MerchantID>8B67BF88-BB8D-4EB5-ADFC-0F5C97C7ED67</MerchantID>
 		<MerchantUserID>978e566b-d62a-42c0-9843-381b3588f333</MerchantUserID>
   		<Card>
                <CardholderName>8-2 Test Demo</CardholderName>
                 <CardNumbr>5413330002001429</CardNumber>
                 <ExpiryMonth>12</ExpiryMonth>
                 <ExpiryYear>25</ExpiryYear>
                 <SecurityCode>360</SecurityCode>
             </Card>
 		</AddCardRequest>
 	</soapenv:Body>
 </soapenv:Envelope>

Response

<s:Envelope
	xmlns:s=""http://schemas.xmlsoap.org/soap/envelope/"">
	<s:Header>
		<h:MessageHeader
			xmlns:h=""http://www.ecentricswitch.co.za/paymentgateway/v1""
			xmlns=""http://www.ecentricswitch.co.za/paymentgateway/v1""
			xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
			xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">
			<MessageDateTime>2024-11-04T10:41:10.147</MessageDateTime>
			<MessageID>7C14FC36-5335-4CCC-8D74-459767EB80C9</MessageID>
			<Channel xsi:nil=""true""/>
		</h:MessageHeader>
	</s:Header>
	<s:Body
		xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
		xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
		<AddCardResponse
			xmlns=""http://www.ecentricswitch.co.za/paymentgateway/v1"">
			<Token>6CC36FEF-14C8-4F6F-A39C-1C077DAAAE3B</Token>
			<TransactionStatus>Success</TransactionStatus>
			<NetworkTokenStatus>NotApplicable</NetworkTokenStatus>
			<NetworkTokenizationFailureReason xsi:nil=""true""/>
			<NetworkTokenizationFailureMessage xsi:nil=""true""/>
			<ResponseDetail/>
		</AddCardResponse>
	</s:Body>
</s:Envelope>"