SiteGenesis Dynamic Payment Processing

The SiteGenesis application supports dynamic payment processing, which makes it easy for you to add new payment methods to your storefront application.

The payment method is what is offered to the customer, while the payment processor is what integrates with a payment provider. The SiteGenesis application uses a generic approach to payment authorization that:

  • Reduces the amount of code changes required to the storefront implementation itself for a new payment processor
  • Relies on integration logic in components outside of the storefront cartridge
  • Supports the independence of storefront business logic and payment integration components
  • Supports the rapid plug-in of payment provider specific logic into existing SiteGenesis storefront business logic without changing SiteGenesis code, for example, for payment LINK cartridges
  • Enables better updatability of payment LINK cartridges

To integrate a new payment processor, start by creating a new payment type by selecting site > Ordering > Payment Processors | Payment Methods. Next, integrate the payment processing methodology into your application using the SiteGenesis code as an example. SiteGenesis provides a generic pipeline-structure that is called in COBilling and COPlaceOrder (in the SiteGenesis Storefront Core cartridge) for handling and authorizing the selected payment method, thus avoiding a static verification of the selected method. The actual reference from the selected payment method to the integration code is payment processor specific and not payment method specific.

Existing Sample Pipelines

You can use existing sample pipelines for preexisting payment processors such as:

  • BASIC_CREDIT
  • BASIC_GIFT_CERTIFICATE
  • CYBERSOURCE_BML
  • CYBERSOURCE_CREDIT
  • PAYPAL_CREDIT
  • PAYPAL_EXPRESS
  • VERISIGN_CREDIT

This sample code merely illustrates the pattern of payment integration. These pipelines provide no real integration into external payment systems, such as PayPal or Cybersource. However, existing integration code (either from LINK cartridges or custom integration logic) can be easily migrated into the above pattern to be called appropriately by the SiteGenesis storefront

Example: Integration of Payment on Delivery

In Business Manager:

  1. Create a new payment processor
  2. Create a new payment method (or reuse an existing one) and assign the new payment processor.

In Studio:

  1. Create a new provider specific pipeline (with the name {PaymentProvider}.xml).
  2. Add and implement the start node Handle with the provider / method specific form validation and payment instrument creation:
  3. Add and implement the start node Authorize with the provider / method specific payment authorization logic.