Area: Episerver Commerce
Applies to versions: 10.2.2 and higher

Payment plugins

Recommended reading 

This topic describes the PaymentPlugin interface, available when building solutions with the payment processing parts of Episerver Commerce. 

How it works

The Payment plugin of Episerver Commerce provides an interface to the payment processing system for abstraction APIs: IPaymentPlugin. A payment type is passed to the payment plugin, which executes the payment transaction via the payment system. One payment type is associated with each payment plugin.

Note: Classes in this topic are available in the EPiServer.Commerce.Order namespace, which contains IPaymentPlugin.

IPaymentPlugin is an improvement over IPaymentGateway, which supports abstraction APIs and Serializable Carts as well. The activities below will be carried out following Payment gateways exactly:

  • Payment plugin properties
  • Using built-in payment
  • Creating a custom payment plugin

There is one important difference between IPaymentPlugin and IPaymentGateway: IPaymentPlugin uses IPayment as a parameter, while IPaymentGateway uses Payment as a parameter.

Commerce 10 example

bool ProcessPayment(IPayment payment, ref string message);

Commerce 11 example

PaymentProcessingResult ProcessPayment(IOrderGroup orderGroup, IPayment payment)

Using IPaymentPlugin, Episerver Commerce provides sample code for PayPal, DIBS and DataCash. See Payment providers.

Do you find this information helpful? Please log in to provide feedback.

Last updated: Apr 17, 2017

Recommended reading