Update Credit Card Transaction

Update a failed transaction

PUT /api/.../creditcardpayments?{false}

This method allows the caller to update ILSStore data when a credit card transaction completed unsuccessfully on the credit card reader device.

Request Information

Parameters
Name Type Required Description
failed Bool Yes Define this parameter in the request query string. Value is 'true'.
DtoFineData
Property Type Nullable Description
PatronID Int Yes Patron ID.
TxnAmount Decimal No Required. Amount that was trying to be paid.
MainTxnIDs Int No Required. List of transaction IDs. Unique identifier for each transaction
PatronPaymentMethod Int No Payment method. Value is 12 for paying by credit card.
FreeTextNote String No Notes
CreditCardPaymentData DtoCCPaymentData Yes Data packet responsed from Innovative.Payments.Service
DtoCCPaymentData
Property Type Nullable Description
TrackId Int No ILSStoreOrder ID
Guid String No Guid generated internally to when credit card transaction is initiated
TxnAmount Decimal No Required. Amount that was trying to be paid.
Error String No Error message. "OK" if transaction succeeded.
TxnStatus String No Latest credit card transaction status. Possible values are InProgress, Success, Failed or Finished.
TroutId String Yes Trout Id
CcDigits String Yes Could be the last 4-digit of the credit card number.
ccType String Yes Could be the credit card type.
AuthCode String Yes Could be credit card transaction auth code.
Response String No Response returned by Payments.Service API
Request body
Example
application/json, text/json
{ 
    "PatronID": 1234,
    "TxnAmount" : 12.15, 
    "FreeTextNote" : "Paying by credit card from LEAP",
    "PatronPaymentMethod": 12,
    "MainTxnIDs":
    [
        123,
        124
    ],
    "CreditCardPaymentData": 
    {
        "trackId": 1234,
        "guid": "xxxx-xxx-xxx-xxx-xxx",
        "vendorId": 0,
        "baseAddress": null,
        "customerID": null,
        "terminalID": null,
        "userName": null,
        "password": null,
        "amount": null,
        "patronID": null,
        "language": null,
        "result": 0,
        "trackNumber": null,
        "error": "Error processing credit card - Error processing credit card (NOT AUTHORIZED) (RESPONSE)",
        "txnStatus": "Failed",
        "troutId": null,
        "ccDigits": "XXXX",
        "ccType": "????",
        "authCode": null,
        "request": "",
        "response": "<Response><Status>Failed</Status><TroutID></TroutID><Error>Error processing credit card - Error processing credit card (NOT AUTHORIZED) (RESPONSE)</Error><CCDigits>XXXX</CCDigits><CCType>????</CCType></Response>"
    }
}

Response Information

Returns 'true' if update succeeded. Otherwise, returns 'false'.

Reference for Polaris enum values:

enum PatronPaymentMethod
{
    PayFrmCredit = 1,
    PayFrmDeposit = 2,
    DepositFrmCredit = 3,
    CreditFrmDeposit = 4,
    CreditFrmPAY = 5,
    StoredValue = 6,
    Cash = 11,
    CreditCard = 12,
    DebitCard = 13,
    Check = 14,
    Voucher = 15,
    CollectionAgency = 16,
    SmartCard = 17
}
            

HTTP Response Codes

Code Description
200 OK. Success
400 Null object. Bad request
409 CONFLICT. Patron record is secured.