An OrderCreateRequest has elements under Payments, one of which can be a CreditCard. Several fields in the CreditCard are supplied from the CreditCardAuthReply from an earlier corresponding CreditCardAuthRequest.

Mapping

The CreditCardAuthReply field mappings start at: /CreditCardAuthReply
The OrderCreateRequest field mappings start at: /OrderCreateRequest/Payment/Payments/CreditCard

CreditCardAuthReply Field OrderCreateRequest Field Transform Comment

//PaymentContext/OrderId

//PaymentContext/PaymentSessionId

copy as is

//PaymentContext/PaymentAccountUniqueId

//PaymentContext/PaymentAccountUniqueId

copy as is

//AuthorizationResponseCode

//Authorization/ResponseCode

See Response Code Transform.

//BankAuthorizationCode

//Authorization/BankAuthorizationCode

copy as is

//CVV2ResponseCode

//Authorization/CVV2ResponseCode

copy as is

//AVSResponseCode

//Authorization/AVSResponseCode

copy as is

//PhoneResponseCode

//Authorization/PhoneResponseCode

copy as is

Required for Amex.

//NameResponseCode

//Authorization/NameResponseCode

copy as is

Required for Amex.

//EmailResponseCode

//Authorization/EmailResponseCode

copy as is

Required for Amex.

//AmountAuthorized

//Authorization/AmountAuthorized

copy as is

Mapping Example

<?xml version="1.0" encoding="UTF-8"?>
<CreditCardAuthReply
    xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
  <PaymentContext>
    <OrderId>12345</OrderId> <!-- MAP1 --> 
    <PaymentAccountUniqueId isToken="true">123abc</PaymentAccountUniqueId> <!-- MAP2 --> 
  </PaymentContext>
  <AuthorizationResponseCode>AP01</AuthorizationResponseCode> <!-- MAP3 --> 
  <BankAuthorizationCode>123456</BankAuthorizationCode> <!-- MAP4 --> 
  <CVV2ResponseCode>M</CVV2ResponseCode> <!-- MAP5 --> 
  <AVSResponseCode>AM</AVSResponseCode> <!-- MAP6 --> 
  <PhoneResponseCode>U</PhoneResponseCode> <!-- MAP7 --> 
  <NameResponseCode>Y</NameResponseCode> <!-- MAP8 --> 
  <EmailResponseCode>N</EmailResponseCode> <!-- MAP9 --> 
  <AmountAuthorized currencyCode="USD">12.34</AmountAuthorized> <!-- MAP10 --> 
</CreditCardAuthReply>
<OrderCreateRequest
    xmlns="http://api.gsicommerce.com/schema/checkout/1.0"
    requestId="123456789">
  <Order customerOrderId="12345">
    ...
    <Payment>
      ...
      <Payments>
        <CreditCard>
          <PaymentContext>
            <PaymentSessionId>12345</PaymentSessionId> <!-- MAP1 --> 
            <TenderType>AM</TenderType>
            <PaymentAccountUniqueId isToken="true">123abc</PaymentAccountUniqueId> <!-- MAP2 --> 
          </PaymentContext>
          <PaymentRequestId>456xyz</PaymentRequestId>
          <CreateTimeStamp>2016-02-12T23:08:20+00:00</CreateTimeStamp>
          <Amount>12.34</Amount>
          <Authorization>
            <ResponseCode>APPROVED</ResponseCode> <!-- MAP3 --> 
            <BankAuthorizationCode>123456</BankAuthorizationCode> <!-- MAP4 --> 
            <CVV2ResponseCode>M</CVV2ResponseCode> <!-- MAP5 --> 
            <AVSResponseCode>AM</AVSResponseCode> <!-- MAP6 --> 
            <PhoneResponseCode>U</PhoneResponseCode> <!-- MAP7 --> 
            <NameResponseCode>Y</NameResponseCode> <!-- MAP8 --> 
            <EmailResponseCode>N</EmailResponseCode> <!-- MAP9 --> 
            <AmountAuthorized>12.34</AmountAuthorized> <!-- MAP10 --> 
          </Authorization>
          <ExpirationDate>2021-01</ExpirationDate>
        </CreditCard>
      </Payments>
    </Payment>
    ...
  </Order>
  ...
</OrderCreateRequest>

Transforms

Response Code Transform

The response code at //Authorization/ResponseCode in the CreditCardAuthReply can have many values. The relevant mapping are below (lowercase x’s mean any character):

CreditCardAuthReply OrderCreateRequest Comment

AP01

APPROVED

AP01 is the only code that means the payment was approved.

NDxx, NCxx, NRxx, NSxx

-

Any response starting with ND, NC, NR, or NS means the card was declined. As such an OrderCreateRequest shouldn’t even be made with such a payment method.

TO01

PaymentProcessorTimeout