IBM Support

RequestCollection opens refund request with async payment mode in failure scenario.

Troubleshooting


Problem

Attempts to call requestCollection opens a new refund request for the failed amount in Sterling Selling and Fulfillment.

Symptom

Steps to replicate:

  1. CreateOrder for $20 with credit card as payment type.

  2. Obtain authorization for $20.

  3. Move order to shipped status and create shipment invoice.

  4. Call processOrderPayment API.

  5. Call recordExternalCharges API for collection, When we receive failed settlement, we use recordExternalCharges with requestProcessed=Y, processedAmount=0 to mark the settlement failure.

    <RecordExternalCharges DocumentType="0001" EnterpriseCode="DEFAULT" OrderHeaderKey="2015081712384695248" >
    <PaymentMethod PaymentKey="201508171201384695250" >
    <PaymentDetailsList>
     <PaymentDetails AuthReturnCode="AUTHORIZED" ChargeType="CHARGE" ProcessedAmount="0" RequestAmount="20" />
     </PaymentDetailsList>
     </PaymentMethod>
     </RecordExternalCharges>

  6. Call processOrderPayment API.

    Result : A new refund request for the failed amount -$20 is opened

Cause

This is due to incorrect implementation of recordExternalCharges API.

Diagnosing The Problem

When Sterling receives a async settlement success response, it uses recordExternalCharges with requestProcessed=Y, processedAmount=X to mark the successful settlement.
But when a failed settlement is received, recordExternalCharges is called with requestProcessed=Y, processedAmount=0 to mark the settlement failure.
On calling requestCollection, a new refund request for the failed amount('-X') is being opened

Resolving The Problem

If there is failure in settlement then the you should cancel the charge that was opened against the first payment method. This is because when the charge request is CLOSED as async for the payment method one, it is assumed that the charge collected is successfully collected and updates the payment method with requested charge amount. This leads to the charge being closed as async.

If there is a failure during the charge processing you will have to cancel the amount that was closed as async for the payment method. Passing requestProcessed=Y, processedAmount=0 is not sufficient to record this failure, since this API would merely open a charge record with credit amount as 0.


The flag CancelPendingAsynchronous should be used for this use case. CancelPendingAsynchronous is meant only for an asynchronous payment processing. This flag is used to record the fact that an asynchronous request's response will not be received. This API expects RequestAmount to be passed as less than 0 to cancel authorization or settlement requests

Refer to recordeExternalCharges API java doc for further details.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Distributed Order Management","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.2.1;9.2;9.1;9.0","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21964830