Hide menu Last updated: Feb 28 2017
Area: Episerver Commerce Applies to versions: 10 and higher
Other versions:

Payment providers

This topics provides an introduction to payment providers in Episerver Commerce. During checkout, a payment type is passed for processing through the payment gateway, to a payment provider, for example PayPal.

By default, the Episerver Commerce sample site includes the following payment provider options:  

  • Pay with Gift Card. Payment using gift cards of certain values and types.
  • Pay by Credit Card. Payment using common credit cards.
  • Pay by Phone. Payment by phone.
  • Credit on Account. Credit payment option for a company account.

There are also code sample projects you can use for popular payment providers, see below.

Gift card payment

The Episerver Commerce sample site has functionality for managing gift cards during the checkout procedure. You can create gift cards for different amounts, define the card's validity period, and combine gift card payments with other payment methods.

The sample site has a page template that enables the customer to enter gift card information during purchasing. Gift cards are administered from the Customers management sub-system.

The gift card payment gateway is implemented in EPiServer.Business.Commerce.Enoteca\GiftCard and added to the sample site during installation and initialization. To learn more about how the gift card is implemented, see GiftcardPaymentGateway.cs in the sample package.

Pay by credit card

Pay by Credit Card, a built-in feature of Commerce Manager in the Episerver Commerce sample site, manages payments for the major credit card providers. The customer enters credit card details, such as card number, expiration date, card name and Card Verification Value number. The system verifies the information and carries out the payment transaction.

Pay by phone

Pay by Phone, another built-in Commerce Manager feature in the Episerver Commerce sample site, manages payments over the telephone. 

Credit on account

The Episerver Commerce sample site contains B2B features that let businesses purchase using associated company accounts. Company account users automatically get the Credit on Account payment option when they check out purchase orders.

Credit on Account is an existing payment method in Commerce Manager, but is not added by default. The sample site uses the code in EPiServer.Business.Commerce.Enoteca\Initialization\DataInitialization.cs to add this.

Example: implementing credit on account

var creditOnAccountPaymentMethod = paymentMethodDto.PaymentMethod.FirstOrDefault(s => s.SystemKeyword.Equals("CreditOnAccount", StringComparison.Ordinal));
if (creditOnAccountPaymentMethod != null)
{
	_logger.Debug("Credit On Account payment provider existed.");
	return;
}

configurationValues = new NameValueCollection();
parameterValues = new NameValueCollection();

configurationValues.Add("Name", "Credit on Account");
configurationValues.Add("Description", "Credit On Account payment method");
configurationValues.Add("SystemKeyword", "CreditOnAccount");
configurationValues.Add("LanguageId", "en-us");
configurationValues.Add("ClassName", "EPiServer.Business.Commerce.Enoteca.CreditOnAccount.CreditOnAccountPaymentGateway, EPiServer.Business.Commerce.Enoteca");

The credit on account payment method is implemented in EPiServer.Business.Commerce.Enoteca\CreditOnAccount, and is added to the sample site during installation and initialization. To learn more about crediting on account, see the CreditOnAccountPaymentGateways.cs in the Episerver Commerce sample package.  

Payment provider samples

Below are payment provider code sample projects by Episerver.

PayPal

DIBS

DataCash

Comments