Process: Check payment status

Flow

Legend

Check payment status

Objective

Check order-payment status to verify the current payment state. This supports the asynchronous nature of payments and the fact that an order may have changed since payment was last authorized.

Description

This process is normally used during release to fulfillment. It is also used during request payment authorization (DoPayment) for a backorder or an order that failed remote fulfillment. It is used in the later cases because request payment authorization processing has already been performed. Only a check of the payment status needs to be performed to get the current status and update the order accordingly.

This process checks to see whether or not the previously approved payment for an order is still valid and whether or not the approved amount is the same as the order amount.

Some examples of why this process is needed are as follows:

Features

Customization

Integration with back-end systems

Edition

Professional, Business Edition

Tasks

Task Description Role
Check TA spending limit

Check the trading-agreement (TA) spending limit to see whether or not it has been exceeded.

An order may include order items that are purchased under different trading agreements, and different trading agreements may have different spending limits.

  • Checks to see whether or not the spending limit of the trading agreement would be exceeded with this purchase if the trading agreement includes a RightToBuy-by-amount terms and conditions (TC).

Records for the purchase amount and refund amount for purchases and refunds against a trading agreement with a RightToBuy-by-amount TC are kept in the same currency specified for the RightToBuy-by-amount TC. These records are kept in separate tables, TRDPURAMT and TRDREFAMT respectively. Note that the currency of this RightToBuy TC must not change once the trading agreement has been activated and purchases have been made against the trading agreement.

Purchases can be made using a currency that is different from the currency specified for the RightToBuy-by-amount TC.

  • For each unique trading agreement specified in the order items that includes a RightToBuy-by-amount TC, this default implementation converts the sum of the purchase amounts of the order items to the currency specified for the RightToBuy TC. If the resulting amount and the sum of all purchase amounts for the trading agreement in the TRDPURAMT table exceed the RightToBuy amount in the TC plus the sum of all refund amounts in the TRDREFAMT table for the same trading ID, the check fails.

The purchase amount of an order item is the sum of the ORDERITEMS.TOTALPRODUCT plus ORDERITEMS.TAXAMOUNT plus ORDERITEMS.SHIPCHARGE plus ORDERITEMS.SHIPTAXAMOUNT minus ORDERITEMS.TOTALADJUSTMENT. (Similarly, the purchase amount for the whole order consists of the sum of ORDERS.TOTALPRODUCT plus ORDERS.TOTALTAX plus ORDERS.TOTALSHIPPING plus ORDERS.TOTALTAXSHIPPING minus ORDERS.TOTALADJUSTMENT. This is the same as the total amount passed by the caller.)

System
Check PO spending limit

Check to see whether or not the spending limit of the purchase order would be exceeded.

Records of the purchase amount of purchases registered against a limited purchase order are kept in the same currency specified for the limited purchase order. These records are kept in the LPOPURAMT table. (Note that the currency specified by the limited purchase order must not change once the purchase order is used for any purchases.)

Purchases can be made using different currencies. Checking involves doing a currency conversion if necessary before checking.

System
Check payment accept policy

Execute the business policy command to check if payment is authorized.

System
Check payment

Execute the check if payment is authorized.

System
Send E-mail to customer

Notify the customer regarding the customer status of the process. This is a general task used to communicate information that the customer should know. In returns processing, the customer is notified if a requested update to a return request is rejected, because the goods were received already or a credit was issued already.

System
Send E-mail to merchant

Notify the customer regarding the customer status of the process. This is a general task used to communicate information that the customer should know. In returns processing, the customer is notified if a requested update to a return request is rejected, because the goods were received already or a credit was issued already.

System
Update TA spending limit

Perform the following:

  • If a trading agreement has both a RightToBuy-by-amount TC(terms and conditions) and an ObligationToBuy-by-amount TC, the currency specified for the two TCs must be the same.

An order may include order items that are purchased under the same trading agreement or different trading agreements.

  • If all the order items specify the same trading agreement with the RightToBuy-by-amount TC or an ObligationToBuy-by-amount TC or both, the default implementation inserts a single row (with the total amount converted to the currency of the TC) into the TRDPURAMT table with the TRDPURAMT.ORDERITEMS_ID column set to null. If not all order items have the same trading agreement, the command inserts multiple rows into the TRDPURAMT table for each order item that has a trading agreement that includes a RightToBuy-by-amount TC or an ObligationToBuy-by-amount TC or both, with the purchase amount of the order item converted to the currency of the TC.
  • For each unique trading agreement in the order with a RightToBuy-by-amount TC, the command also checks to see whether or not the total purchase amounts of the order items converted to the currency specified for the RightToBuy TC plus the sum of all purchase amounts for the trading agreement in the TRDPURAMT table exceeds the RightToBuy amount in the TC plus the sum of all refund amounts in the TRDREFAMT table for the same trading ID. If it does, the task command throws an ECApplicationException and the insert does not happen.

The purchase amount of an order item is the sum of the ORDERITEMS.TOTALPRODUCT plus ORDERITEMS.TAXAMOUNT plus ORDERITEMS.SHIPCHARGE plus ORDERITEMS.SHIPTAXAMOUNT minus ORDERITEMS.TOTALADJUSTMENT.

Since this task command may be called more than once, skip the insert if the row or rows already exist

System
Update PO spending limit

Perform the following:

  • The default implementation inserts a row into the LPOPURAMT table if the purchase was done specifying a limited purchase order. (No row is created if the purchase order specified is not a limited purchase order.)
  • Throws an ECApplicationException if the purchase amount exceeds the purchase-order spending limits specified via a purchase-order TC for a limited purchase order.
  • If the purchase was made using a currency that is different from the currency specified for the limited purchase order, the total amount will be converted to the purchase-order currency before storing it in the LPOPURAMT table.
  • Because this task command may be called more than once, skip the insert if the row already exists.
  • The total purchase amount of the limited purchase order is not decremented if a refund is issued later against the order.
System
Check external account

This task is used to check the payment against the customer account through an external accounting system. It is intended for third parties to extend and write implementation code for integration with an external accounting system.

System
Cancel order

Update the order state to canceled (X).

System

Business artifacts

Feedback