Reference > Payments subsystem > Payments subsystem > Payment plug-ins
LOC (Line of credit) 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 accounts receivable systems used by customers. The LOC plug-in mimics the function of an actual line of credit. By default, it does not connect to an accounts receivable system.
To connect to an account receivable system, write the own version of the plug-in.
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.
Process flow
The following scenario summarizes how the LOC plug-in handles credit-line transactions:
- 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.
- 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.
- The customer submits the order.
- The Payment rules engine creates a payment instruction in the database.
- The Payment plug-in controller 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.
- 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 plug-in controller performs the approve transaction.
- A new payment is created in the database.
- The LOC plug-in checks the parameters.
- 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.
- The customer receives a message indicating Order has been successfully processed .
Contents and location
The LOC plug-in package contains:
- A stateless session bean:
- com.ibm.commerce.payments.plugin.loc.beans.LOCPluginBean
- com.ibm.commerce.payments.plugin.loc.beans.LOCPlugin
- com.ibm.commerce.payments.plugin.loc.beans.LOCPluginHome
- PluginDeployment.xml - the payment plug-in deployment descriptor for the LOC plug-in
The following XML file is the deployment descriptor used by the LOC plug-in.
<?xml version="1.0" encoding="UTF-8"?> <Plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../com.ibm.commerce.base.doc/PaymentPlugin.xsd"> <PluginInformation jndi="ejb/com/ibm/commerce/payments/plugin/loc/beans/LOCPluginHome" home="com.ibm.commerce.payments.plugin.loc.beans.LOCPluginHome" name="LOCPlugin" version="1.0.0" vendor="IBM" independentCredit="true" virtualTerminal="none"> </PluginInformation> </Plugin>
The JAR file for the plug-in and plug-in deployment descriptor are located in the following directories:
- WC_EAR/Payments_Plugin_LOC.jar
- WC_EAR/xml/config/payments/ppc/plugins/LOC/PluginDeployment.xml
The required parameters for the LOC plug-in are:
- account
- credit line number (CreditLineNumber)
- buyer organization name (BuyerOrgName)
- buyer organization distinguished name (BuyerOrgDN)
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 by 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. The plug-in does not have any access control. It grants the accesses permitted by the Payment rules engine.
LOC plug-in payment and credit state handling
The LOC plug-in moves payment and credit states according to the Payment plug-in specification. There are no particular exceptions to how the plug-in moves 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 translation. It uses the standard messaging functions described in the Payment plug-in specification.
Related concepts
Related tasks
Migrate from WebSphere Commerce Payments Multipayment Framework to a payment plug-in
Convert custom V5.x payment task or policy command implementations to a payment plug-in
Related reference
Replacement commands for WebSphere Commerce Payments Multipayment Framework commands
LOC plug-in financial transactions