Line of credit payment plug-in

The Line of credit (LOC) plug-in is a payment plug-in provided in WebSphere Commerce. WebSphere Commerce Payments performs the database operations necessary to record all the payment transactions for this plug-in.

The LOC plug-in enables merchants to use lines of credit as a payment method. It enables buyers to delay the payment settlement for orders and is intended to integrate with account receivable systems used by customers. As provided in WebSphere Commerce, the LOC plug-in mimics the function of an actual line of credit. By default it does not connect to an account receivable system. To connect to an account receivable system, either modify the LOC plug-in or write your own version of the plug-in. Plug-in writers can also use the plug-in as an example when developing their own plug-ins.

The line of credit payment method is typically used in a B2B environment, but it can be used in a B2C environment.

In a B2B direct store, the contract terms and conditions can allow payments or refunds using a credit line, if the business account has a credit line. The creation, modification, or deletion of the credit line is managed by a business account in WebSphere Commerce.

To use a credit line as a payment method, a buyer negotiates with a seller ahead of time and creates an account with the seller in WebSphere Commerce with the appropriate credit line setting. When a buyer places an order in a store and specifies the line of credit payment method, the account is checked to see if it is active and that an active credit line exists between the buyer and seller. If the credit line is active, the payment instruction is recorded for the order and payment is authorized. The credit line is checked to ensure it is still active when the order is fulfilled, when the deposit for the payment occurs, and when a refund is issued. The account holder is responsible for payment settlement on an outstanding balance on a credit line. If a credit line is used for payment, the seller debits the account for an order at the time of payment capture and the account is credited during payment settlement.

When the LOC plug-in is used, the active state of the credit line is checked before the Payment Rules subcomponent calls WebSphere Commerce Payments. Therefore, as provided the LOC plug-in does not check the active status of the account nor the credit line. It only assists the WebSphere Commerce Payments with checking parameters and recording financial transactions (the recording of transactions is done by WebSphere Commerce Payments).

The LOC plug-in does not recognize or manage any credit line spending limitation that can be established in WebSphere Commerce in a limited Purchase Order or in the RightToBuy terms and conditions for a contract.

Location

The LOC plug-in package contains:

The JAR file for the plug-in and plug-in deployment descriptor are located in the following directories:

The LOC plug-in implements the Payment plug-in specification. The LOC plug-in assists WebSphere Commerce Payments check parameters and record payment transactions in the database. The LOC plug-in can be extended to connect to a particular accounting system. This plug-in is provided as a sample only and does not directly connect to a back-end system. This plug-in can be extended to connect to account receivable systems.

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 WebSphere Commerce Payments is called. The LOC plug-in then assists WebSphere Commerce Payments 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 Payment Rules function is called. WebSphere Commerce Payments 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. WebSphere Commerce Payments invokes the LOC plug-in.
  5. The LOC plug-in checks if the required data is included in the payment instruction. (If data is missing or incorrect the plug-in produces an invalid parameter error.) The data is included so the payment instruction is considered valid and the Payment Rules 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 Payment Rules.
  8. WebSphere Commerce Payments processes 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. WebSphere Commerce Payments 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 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.

The data expected by the LOC plug-in to process financial transactions consists of the following parameters:

The plug-in checks the potential required parameters to see if an external accounting system exists. If the required parameters in the extended data do not exist, an invalid data error is produced.

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.

LOC plug-in security

The LOC plug-in delegates the encryption and storage of sensitive data in the database to the WebSphere Commerce Payments.

The plug-in does not have any access control. It grants the accesses permitted by the Payment Rules subcomponent and WebSphere Commerce Payments.

LOC plug-in payment and credit state transition handling

The LOC plug-in transitions payment and credit states according to the Payment plug-in specification. There are no particular exceptions to how the plug-in transitions payment and credit states.

LOC plug-in messages

The LOC plug-in does not use any special messages resource bundle and therefore has no additional properties files for message internationalization. It uses the standard messaging functions described in the Payment plug-in specification.