Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Payment plugins

Describes the PaymentPlugin interface that provides an interface to the payment processing system for abstraction APIs in Optimizely Commerce Connect.

The PaymentPlugin is available when building solutions with the payment processing parts of Optimizely Commerce Connect. A payment type is passed to the payment plugin, which executes the payment transaction via the payment system. Each payment plugin is associated with a specific payment type.

📘

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.

Example [New in Commerce Connect 14]

PaymentProcessingResult ProcessPayment(IOrderGroup orderGroup, IPayment payment)

A simple implementation of the Adyen payment gateway is available in the "Quicksilver" Commerce reference sample project on GitHub.

Commerce Connect 11-13 example

PaymentProcessingResult ProcessPayment(IOrderGroup orderGroup, IPayment payment)

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

Commerce Connect 10.2.2-10.x example

bool ProcessPayment(IPayment payment, ref string message);