This content is archived. See latest version here

Last updated: Mar 31 2014

A Payment Provider allows a payment to be accepted during checkout. When you install the EPiServer Commerce sample site, the payment provider options listed below will be included by default:

  • Pay with Gift Card- payment using gift card of certain values and types.
  • Pay by Credit Card - payment using the most common credit cards.
  • Pay by Phone - payment method where payment is done by phone.
  • Credit on Account - credit payment option for a company account.

Refer to Payments and Payment Gateways in this documentation for related information.

Gift card payment

The EPiServer Commerce sample site has functionality for managing gift cards that are used during the checkout procedure. You can create gift cards for different amounts and define the validity period for the card. A gift card payment can be combined with other payment methods.

The sample site has a page template which enables the customer to enter gift card information to be used during purchasing. Gift cards are administered from the Customers management sub-system. The functionality of the gift card page templates is described in more detail in the user documentation for EPiServer Commerce.

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

Pay by credit card

The Pay by Credit Card payment provider is available by default in a standard installation of the EPiServer Commerce sample site. This widely used payment option is used for managing 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 the payment transaction is carried out.

Pay by Credit Card is a built-in feature of Commerce Manager. Refer to the Payment Gateways section for more information on how to work with payment types and payment gateways.

Pay by phone

The Pay by Phonepayment provider is available by default in a standard installation of the EPiServer Commerce sample site. This payment method makes it possible to manage payments over telephone

Pay by Phone is built-in feature of Commerce Manager. Refer to the Payment Gateways section for more information on how to work with payment types and payment gateways.

Credit on account

The EPiServer Commerce sample site contains B2B features allowing businesses to purchase using associated company accounts. Company account users will automatically get the Credit on Account payment option when checking out purchase orders.

Credit on Account is an existing payment method in Commerce Manager, but will not be 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

C#
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");
                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 on how credit on account is implemented, refer to the CreditOnAccountPaymentGateways.cs in the EPiServer Commerce sample package.


Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/