Popular Posts

Creating a new Payment Method

Adding a new payment business policy has following steps:

  1.     Defining the policy name and attributes of the policy
  2.     Updating the database tables with the information about the payment methods or refund methods that the store will use. 
  3.     Defining the payment and refund actions in the configuring XML files.
  4.     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 policy( policy_id, policyname, policytype_id, storeent_id, properties ) values( newPolicyId, 'VISA', 'Payment', -1, 'attrPageName=StandardCreditCard&excludeFrom=defaultTC&requireExplicit=true&paymentConfigurationID=123&display=true' )

            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.DoPaymentActionsPolicyCmdImpl' )
            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
        The business policy tables do not contain information about the type of payment or refund actions or rules the Payments subsystem will use. They identify the payment and refund methods. Payment methods and refund methods are defined in the following database tables.
       
        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.

    Defining the payment and refund actions in the configuring XML files


  • PaymentMappings XML file
            Configure the mapping from payment method to payment method configuration and payment actions. This defines what payment rule a payment method. The behavior of payment processing also changes; when a different payment rule is specified, the actions the system takes also change.
           
            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
          Goto to the follwoing location:
           
                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>       

    Creating the payment plugin based on the implementation

      Follow the below IBM Inficenter Link to create a new payment plugin
        http://www.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.payments.events.doc/tutorial/tppmain.htm


4 comments:

  1. Your blog has given me that thing which I never expect to get from all over the websites. Nice post guys!

    Melbourne SEO Services

    ReplyDelete
  2. 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

    ReplyDelete
  3. Once you have the information that you need, you will be able to make an informed decision to get meet with payment gateway providers.

    ReplyDelete
  4. There 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.

    ReplyDelete