Payments

In this article

Credit Card

Loyalty Points

Gift Card

Commerce has its own Tender Type codes.

Default are: 0=Cash, 1=Card, 2=Coupon, 3=Loyalty Points, 4=Gift Card

Commerce Tender Types are mapped over to LS Central Tender Type Code that have been assigned to the Web Store in Store Page. Mapping is configured in Commerce Database – TenantConfig table – Record with Key: TenderType_Mapping.

If no Tender Type mapping is set in the Value field, Tender Type Code from LS Central will be used as-is from the Store Card.

Credit Card

  1. Send in OrderPayment of Tender Type Card (1).
  2. Set the Amount to the value that should be authorized for the Order and PaymentType to PreAuthorization or Payment.
  3. Fill in AuthorisationCode and TokenNumber that payment provider sends.

There is an option of adding ExternalReference that was used when payment was requested. All this information will be returned when final payment is requested at a time when the order is ready to be shipped.

Copy

Credit Card Payment

<ns1:OrderPayments>
    <ns1:OrderPayment>
        <ns1:Amount>160.00</ns1:Amount>
        <ns1:AuthorizationCode>123456</ns1:AuthorizationCode>
        <ns1:CardNumber>45XX..5555</ns1:CardNumber>
        <ns1:CardType>VISA</ns1:CardType>
        <ns1:CurrencyCode>GBP</ns1:CurrencyCode>
        <ns1:CurrencyFactor>1</ns1:CurrencyFactor>
        <ns1:ExternalReference>My123456</ns1:ExternalReference>
        <ns1:LineNumber>1</ns1:LineNumber>
        <ns1:PaymentType>PreAuthorization</ns1:PaymentType>
        <ns1:PreApprovedValidDate>2030-01-01</ns1:PreApprovedValidDate>
        <ns1:TenderType>1</ns1:TenderType>
        <ns1:TokenNumber>123456</ns1:TokenNumber>
    </ns1:OrderPayment>
</ns1:OrderPayments>

Loyalty Points

  • Send in OrderPayment of Tender Type Cash (0) and Currency Code "LOY".

LS Central treats Loyalty points as Currency and has special Currency record (default LOY) with Currency Rate to handle Point payment. The Rate tells how much value each point has in cash value and can be fetched by calling GetPointRate.

Copy

Loyalty Point Payment

<ns1:OrderPayments>
    <ns1:OrderPayment>
        <ns1:Amount>100.00</ns1:Amount>
        <ns1:CardNumber>10023</ns1:CardNumber>
        <ns1:CurrencyCode>LOY</ns1:CurrencyCode>
        <ns1:CurrencyFactor>0.1</ns1:CurrencyFactor>
        <ns1:LineNumber>1</ns1:LineNumber>
        <ns1:TenderType>0</ns1:TenderType>
    </ns1:OrderPayment>
</ns1:OrderPayments>

Gift Card

  • Send in OrderPayment of Tender Type Gift Card (4) and Gift Card number in CardNumber, if Gift Card has Pin number it will go into AuthorizationCode and Gift card amount to be used in Amount.

Before send in Gift Card with Pin, Gift Card validation if it has enough amount and Pin is correct should be done by calling GiftCardGetBalance.

Copy

Gift Card Payment

<ns1:OrderPayments>
    <ns1:OrderPayment>
        <ns1:Amount>100.00</ns1:Amount>
        <ns1:AuthorizationCode>12341</ns1:AuthorizationCode>
        <ns1:CardNumber>123456</ns1:CardNumber>
        <ns1:CurrencyCode>GBP</ns1:CurrencyCode>
        <ns1:CurrencyFactor>1</ns1:CurrencyFactor>
        <ns1:LineNumber>1</ns1:LineNumber>
        <ns1:TenderType>4</ns1:TenderType>
    </ns1:OrderPayment>
</ns1:OrderPayments>