Payment plug-in controller

The Payment plug-in controller is a component of the Payments subsystem. It determines which plug-in to use (based on the payment method) and which plug-in API method to call (based on the action).

The Payment plug-in controller completes the following steps:

  1. Creates a financial transaction.
    • A FinancialTransaction is used to track the progress of the Action as it is processed.
    • It is populated with data associated to the Action and the Payment Instruction.
    • The FinancialTransaction object will contain attributes such as:
      
      state:               new	
      requested amount:   359.000	
      processed amount:   0.00000	
      reference number:   ...	
      response code:      ...
      payment ID:         10001
      ...
    • The transaction data is stored in the PPCPAYTRAN table.
  2. Determine which plug-in to use based on the Payments configuration files:
    • Use the PaymentMappings XML file to get the payment configuration based on the selected payment method.
      <Mapping paymentMethod="VISA"
      	paymentConfiguration="CreditCardOnline"
      	paymentActionRule="Early Approval"/>
      
    • Use the PaymentMethodConfigurations XML file to get the payment system name based on the payment configuration.
      <PaymentMethodConfiguration 
      	     name="CreditCardOnline"
           paymentSystemName="Paymentech" 
           systemEditable="true"
           humanEditable="true"
           refundAllowed="true"
           minimumAmount="0"
           maximumAmount="Unbounded"
           priority="MEDIUM"
           partiallyConsumable="true"/>
    • And finally, use the PaymetSystemPluginMapping XML file to get the plug-in name based on the payment system name.
      <PaymentSystemName name="Paymentech" >
           <Mapping paymentConfigurationId="default" pluginName="PaymentechPlugin" >
                <Keyword name="cc_cvc" mask ="-" plain="0" removeAfterApproval ="true"/>
                <Keyword name="cc_nameoncard" mask ="*" plain="0" removeAfterApproval ="true"/>
                <Keyword name="account" mask ="*" plain="-5" searchable="true"/>
           </Mapping>
      </PaymentSystemName>
      Then the payment method configuration CreditCardOnline will be mapped to the payment system Paymentech in PaymentMethodConfigurations.xml, and the payment system Paymentech will be mapped to the payment plug-in PaymentechPlugin in PaymentSystemPluginMapping.xml.
  3. Calls Plugin.Approve(). In this case, PaymentechPlugin.Approve().
  4. Persist the up-to-date payment states with corresponding payment information in the payment related tables.