Because there are several dozen payment service providers available, the e-commerce solution needs to integrate with whichever payment provider(s) the merchant has contracted. This article outlines how Mercury enables your solution to integrate with your chosen payment service provider.
Payment methods and payment providers
When customers are provided a choice of different payment methods, they might be required to use a different payment provider for each payment method. Mercury allows you to configure the actual payment provider to be used for a specific payment method. This is done entirely within the Sitecore Content Editor.
Mercury uses an extensible adapter model to connect the checkout process of the e-commerce solution to the payment provider for the selected payment method. A connector for
Ingenico is provided out of the box, while a flexible interface makes it possible to create a custom adapter for any other payment provider.
Creating a Payment Provider Adapter
The following image shows the typical interaction between the customer, merchant and payment provider in great detail.
After selecting a payment method and possible payment options, the customer interacts directly with the payment provider to make the payment. After the payment is finished the payment provider informs the merchant whether the payment was successful. If successful, the merchant can continue to fulfill the order.
A custom adapter for a payment provider can be plugged into Mercury. This adapter is implemented as a processor that fits into a Mercury specific pipeline using Sitecore’s standard pipeline mechanism. The adapter will then handle the interaction with the payment provider to announce the payment and receive status updates from the payment provider.
This typically involves mapping data from the customer’s order to a format specific to the payment provider including encryption and/or a cryptographic hash. Handling status updates from the payment provider involves validating that the update really came from the payment provider, and then updating the status of the commerce order accordingly.
Conclusion
Mercury provides a powerful mechanism to integrate your E-commerce solution with any payment service provider, thereby minimizing the work that needs to be done if there is no standard adapter available. Multiple payment providers can be used simultaneously depending on the configuration and the payment options selected by the customer.
Related articles