Advanced orders How the LOC payment plug-in works

The LOC plug-in implements the Payment plug-in specification. The LOC plug-in assists the Payment Plug-in Controller check parameters and record payment transactions in the database. The LOC plug-in can be extended to connect to a particular accounting system.

After a buyer submits an order and specifies that a credit line should be used for payment, the system sends the payment approve request. The active state of a credit line is checked before the Payment Plug-in Controller is called. The LOC plug-in then assists the Payment Plug-in Controller by checking to see if sufficient data is available to perform the transaction. This data includes the buyer, seller, account number, and order information. If the data exists and the order passes this check, the LOC plug-in returns an indication that the payment authorization was successful. A response is sent to the merchant to indicate the payment is good. The merchant can check the payment status of the order later when the order is filled. When the order ships, the merchant can send a deposit request against the payment.

The following scenario summarizes how the LOC plug-in handles credit line transactions:

  1. A customer logs into a B2B store, browses a catalog, and adds an item to a shopping cart. The price is defined by a contract and the contract includes an account with a defined credit line. The credit line is active.
  2. The customer proceeds to check out and sees that he can select a credit line as a payment method. The customer selects LOC as the payment method.
  3. The event-driven payments function is called. The Payment Plug-in Controller creates a payment instruction in the database and identifies the LOC plug-in as the plug-in to use by checking the PaymentSystemPluginMapping.xml configuration file. This configuration file identifies the plug-in to use for a given payment system and payment configuration ID. A store is associated with a payment configuration ID in the POLICY database table.
  4. The Payment Plug-in Controller invokes the LOC plug-in.
  5. The LOC plug-in checks to see if the required data is included in the payment instruction. (If data is missing or incorrect the plug-in throws an invalid parameter exception.) The data is included so the payment instruction is considered valid and the event-driven payments subcomponent performs the approve transaction according to its configuration rules.
  6. The customer submits the order.
  7. A new payment is created in the WebSphere Commerce database according to the payment rules.
  8. The Payment Plug-in Controller executes the approval.
  9. The LOC plug-in checks the parameters. If an external account receivable system is available, it connects to that system, checks the status of the active credit line, and allocates the requested amount from the spending balance. Note: As provided, the LOC plug-in does not connect to any account receivable system.
  10. The database is updated with information received from the LOC plug-in. The Payment Plug-in Controller returns an indication that the payment was approved successfully.
  11. The customer receives a message indicating "Order has been successfully processed" and logs off the store.

Note: When the advanced orders function and the LOC plug-in are not used, and a standard credit line payment method is used instead, the following payment commands are used by WebSphere Commerce to perform credit line transactions: DoPaymentCLCmdImpl, CheckPaymentAcceptCLCmdImpl, DoDepositCLCmdImpl, DoRefundCLCmdImpl. When the LOC plug-in is used, these commands are not invoked.

Plug-in restrictions

The LOC plug-in does not support currency conversion and cannot detect if the currency in the order is the same as defined in the account. The currency provided through the order capture process is the currency used by the LOC plug-in.

The LOC plug-in does not support the QueryablePlugin interface in the Payment Plug-in Specification.

Feedback