...
Code Block | ||
---|---|---|
| ||
if (isPaymentRequired) { // order must be in payment successful or payment required state to proceed if ( status !== RbiOrderStatus.PAYMENT_SUCCESSFUL && status !== RbiOrderStatus.PAYMENT_REQUIRED ) { throw new UnpaidCommitOrderError(rbiOrderId); } } else { // non payment required means order needs to be price successful if (status === RbiOrderStatus.PRICE_ERROR) { throw new OrderPriceError(rbiOrderId); } else if (status !== RbiOrderStatus.PRICE_SUCCESSFUL) { throw new OrderStatusMismatchError(rbiOrderId, RbiOrderStatus.PRICE_SUCCESSFUL); } } |
For the winrest integration, the code messages the POS vendor configured in the rbi/{env}/{brand}/partners-api secret inRBI account secrets DynamoDB table.
Sodexo/Cheque Gourmet example
...