This content is archived. See latest version here

A Payment Provider accepts a payment during checkout. 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 is done by phone.
  • Credit on Account. Credit payment option for a company account.

Gift card payment

The Episerver Commerce sample site has functionality for managing gift cards used 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 the 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 CVV (Card Verification Value) number). The system verifies the card information and carries out the payment transaction.

Pay by phone

Pay by Phone, another built-in feature of Commerce Manager 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.");

                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");
                configurationValues.Add("PaymentImplementationClassName", "Mediachase.Commerce.Orders.OtherPayment, Mediachase.Commerce");
                configurationValues.Add("Ordering", "100");
                configurationValues.Add("IsActive", "True");
                configurationValues.Add("SupportsRecurring", "False");

                parameterValues.Add(CreditOnAccountPaymentGateway.IsCompanyPaymentMethodParameter, "True");

                CreatePaymentMethod(configurationValues, parameterValues, false);

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.

Related topic

Last updated: Oct 12, 2015