Payments

Commerce has its own Tender Type codes.

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

Credit Card

Loyalty Points

Gift Card

Commerce Tender Types are then mapped over to LS Central Tender Type code, and the mapping is configured in Commerce Database – Appsettings table – Record with Key: TenderType_Mapping.

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.
  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:AuthorisationCode>123456</ns1:AuthorisationCode>
        <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 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 and Gift card amount to be used in Amount.

Copy

Gift Card Payment

<ns1:OrderPayments>
    <ns1:OrderPayment>
        <ns1:Amount>100.00</ns1:Amount>
        <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>