Adding a new payment business policy has following steps:
- Defining the policy name and attributes of the policy
- Updating the database tables with the information about the payment methods or refund methods that the store will use.
- Defining the payment and refund actions in the configuring XML files.
- Creating the payment plugin based on the implementation
Defining the policy name and attributes of the policy and updating the database tables
- Create a payment policy using the following SQL statements as a guide.
insert into policydesc( policy_id, language_id, Description, longDescription ) values( newPolicyId, -1, 'VISA', 'Visa Credit Card used as a payment method while placing an order' )
- Register the policy commands using the following SQL statements as a guide.
insert into policycmd( policy_id, businesscmdclass ) values ( newPolicyId, 'com.ibm.commerce.payment.actions.commands.EditPaymentInstructionPolicyCmdImpl' )
insert into policycmd (policy_id, businesscmdclass) values (newPolicyId, 'com.ibm.commerce.payment.actions.commands.QueryPaymentsInfoPolicyCmdImpl')
- Tables Associated
POLICY: Defines the payment and refund methods that are used by a store or store group.
POLICYDESC: Stores the descriptive names of the policy (such as the short and long description).
POLICYCMD: Defines a set of payment command implementations for each payment policy.
- Properties
paymentConfigurationId: This is the payment configuration group.
attrPageName: This identifies the name of the JSP snippet (without the .jsp suffix) that is used to generate an HTML page.
The HTML Page prompts the user for the payment attributes or parameters that are required by the payment policy.
JSP snippets are available for processing standard credit card brands and other payment methods.
display: This identifies whether the payment method is displayed at the storefront for the shopper to use.
false
Shoppers cannot use this payment method.
true
The default value. Shoppers can use this payment method.
compatibleMode: This identifies whether this payment method uses payment plug-ins.
false
The default value. The payment method uses payments plug-ins.
true
The payment method integrates with Payment Service Provider by using non-plug-in mechanism that is provided by WebSphere Commerce version 5.x.
attrPageName: This identifies the name of the JSP snippet (without the .jsp suffix) that is used to generate an HTML page.
The HTML Page prompts the user for the payment attributes or parameters that are required by the payment policy.
JSP snippets are available for processing standard credit card brands and other payment methods.
display: This identifies whether the payment method is displayed at the storefront for the shopper to use.
false
Shoppers cannot use this payment method.
true
The default value. Shoppers can use this payment method.
compatibleMode: This identifies whether this payment method uses payment plug-ins.
false
The default value. The payment method uses payments plug-ins.
true
The payment method integrates with Payment Service Provider by using non-plug-in mechanism that is provided by WebSphere Commerce version 5.x.
Defining the payment and refund actions in the configuring XML files
- PaymentMappings XML file
Note: You cannot change the payment rules associated with refund methods because the rules are not configurable for refund methods.
Goto to the follwoing location:
WC/xml/config/payments/edp/groups/default
Define the mapping for the new payment method that is created
<?xml version="1.0" encoding="UTF-8"?>
<PaymentMappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="com/ibm/commerce/edp/parsers/PaymentMappings.xsd">
<Mapping paymentMethod="VISA"
paymentConfiguration="CreditCardOnline"
paymentActionRule="Early Approval" />
</PaymentMappings>
Parameters
paymentMethod: The name of the payment method. It is defined in the POLICY table as the value of the column POLICYNAME for the Payment business policies.
paymentConfiguration: The payment method configuration applied to the payment method.
paymentActionRule: Payment rule that applies to the payment method. This file can contain multiple payment method mappings. See Payment rules provided in WebSphere Commerce.
Whenever a new payment or refund method is added to a store, a business policy with the Payment or ReturnPayment type must be created in the business POLICY table (with corresponding entries in the POLICYDESC table), and the POLICYCMD table will be inserted a set of payment policy commands. For every new entry added to the POLICY table, the value for the Business Policy Name field must match the payment (or refund) method ID configured in payment rules (the paymentMethod value in the PaymentMethodConfigurations.xml file, or the refundMethod value in the RefundMethodConfigurations.xml file).
- Update the CreditCardOnline payment method configuration
WC/xml/config/payments/edp/groups/PaymentMethodConfigurations.xml
<PaymentMethodConfiguration humanEditable="true"
maximumAmount="Unbounded" minimumAmount="0"
name="CreditCardOnline" partiallyConsumable="true"
paymentSystemName="MyPaymentSystem" priority="MEDIUM"
refundAllowed="true" systemEditable="true"/>
- PaymentSystemMapping XML file
A new payment system will be defined in the payment system mapping file and mapped to the payment plug-in.
Goto to the follwoing location:
WC/xml/config/payments/ppc/plugins/PaymentSystemPluginMapping.xml
<PaymentSystemName name="MyPaymentSystem">
<Mapping paymentConfigurationId="default" pluginName="MyPaymentPlugin">
<Keyword name="account" mask ="*" plain="-5" searchable="true" />
</Mapping>
</PaymentSystemName>
Goto to the follwoing location:
WC/xml/config/payments/ppc/plugins/PaymentSystemPluginMapping.xml
<PaymentSystemName name="MyPaymentSystem">
<Mapping paymentConfigurationId="default" pluginName="MyPaymentPlugin">
<Keyword name="account" mask ="*" plain="-5" searchable="true" />
</Mapping>
</PaymentSystemName>
Creating the payment plugin based on the implementation
Follow the below IBM Inficenter Link to create a new payment pluginhttp://www.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.payments.events.doc/tutorial/tppmain.htm
Your blog has given me that thing which I never expect to get from all over the websites. Nice post guys!
ReplyDeleteMelbourne SEO Services
Payment gateway arrangement is a strategy that requires the web as a phase to finish portion preparing. There are various strategies for online portion arrangements available and most associations try to offer a variety with the objective that they guarantee to a greater group.Jack just posted: Bluehost shared hosting
ReplyDeleteOnce you have the information that you need, you will be able to make an informed decision to get meet with payment gateway providers.
ReplyDeleteThere are many users who want their payment gateway integration to their online platforms where they accept payments. You need to know all the integration, in this article you will learn all the steps for payment gateway integration.
ReplyDeleteObtaining an aggregator license in India is a crucial step for businesses in the transportation, logistics, and digital marketplace sectors. It ensures compliance with government regulations and builds trust with users. The process can be complex, requiring thorough documentation and adherence to guidelines. Leveraging professional assistance simplifies the process and ensures a smooth application experience. Securing this license is vital for operating legally and sustainably in the growing aggregator ecosystem.
ReplyDelete