Add-ons and ModulesPayPal Express Checkout

PayPal Express Checkout

Sana Commerce 8.3
Your provider

Configure a Test PayPal Express Checkout Payment Module

In order to add the PayPal Express Checkout Payment Module to a project, please undertake the following steps:

Step 1: Copy the 'Sana.Commerce.Payment.PayPal.ExpressCheckout.dll', 'Sana.Commerce.Payment.PayPal.ExpressCheckout.pdb' and 'Sana.Commerce.Payment.PayPal.ExpressCheckout.xml' files from the 'bin' folder of the PayPal add-on package to the 'Frontend/bin' folder of Sana Commerce.

Step 2: Configure the Sana Commerce frontend to use the PayPal Express Checkout payment module. This configuration is performed in the 'web.config' file of the Sana Commerce frontend:

  • Locate the 'PayPal Express Checkout configuration section.txt' file in the 'configuration' folder, which contains the PayPal Express Checkout payment module configuration section;
  • Copy the whole text of this file into the <payment-configuration> section of the 'web.config' file, so it will look as follows:
<module name="PayPalExpressCheckout" type="Sana.Commerce.Payment.PayPal.ExpressCheckout.ExpressCheckoutPaymentModule, Sana.Commerce.Payment.PayPal.ExpressCheckout">
    <add name="ResponseUseXml" value="false" isRequestParameter="false" />
    <add name="ResponseUsePost" value="false" isRequestParameter="false" />
    <add name="DebugDomains" value="localhost" isRequestParameter="false" />
    <add name="IpCheck" value="|||" isRequestParameter="false" />
    <add name="PaymentPage" value="" isRequestParameter="true" />
    <add name="ApiEndpoint" value="" isRequestParameter="false" />
    <add name="USER" value="…" isRequestParameter="true" />
    <add name="PWD" value="…" isRequestParameter="true" />
    <add name="SIGNATURE" value="…" isRequestParameter="true" />
For an explanation of the configuration values, please read this chapter and the chapter 'PayPal Express Checkout Specific Configuration Values' below and the chapter 'General External Payment Method Configuration Values'.

Step 3: Configure the PayPal Express Checkout payment method. To do this execute the 'ConfigurePayPalExpressCheckoutInDB.sql' SQL script on the Sana Commerce database. You can find the script in the 'scripts' folder of the PayPal package.

Before running the script check the value of the '@siteId' variable and change it if needed to match the appropriate website identifier and check whether the currency is correct.

The 'ConfigurePayPalExpressCheckoutInDB.sql' SQL script adds the 'PayPal' payment method.
This payment method will be available for all countries configured in the system. No translations for the payment method will be set by this script - this should be done manually. After the script has been executed, all fields should be checked for the correct values.

When the script has been executed, the PayPal payment method can be seen in the Sana Commerce backoffice > Settings > Payment methods. Here you can manage the payment methods: edit or remove the existing payment methods or create and configure any other payment methods. If you need to use any other payment methods that are supported by the installed payment provider you can create and configure them on the 'Payment methods' page in the Sana Commerce backoffice. For more information about management of the payment methods in the Sana Commerce backoffice, see 'Payment methods'.

Step 4: Find the 'files' folder, where the PayPal payment method icon is stored. Copy the 'files' folder into 'Frontend\content\'.

This icon will be displayed on the frontend in the payment method selection control.

Step 5: Create a PayPal Sandbox account at This will create a sandbox environment to test Express Checkout.

Step 6: Create a preconfigured seller account in the sandbox environment under the 'Test Accounts' menu.

Step 7: Modify the USER, PWD and SIGNATURE configuration values to the user, password and signature of the sandbox seller account, which can be found under the 'API Credentials' menu.

Step 8: Create one or more (preconfigured) buyer accounts in the sandbox environment under the 'Test Accounts' menu. These accounts can be used to make test payments in the sandbox environment.

Step 9: Customize the look and feel of the Express Checkout pages. This can be done by logging in with the seller account at and configuring custom styles under 'My Account -> Profile -> Custom Payment Pages'.


In order to receive feedback from PayPal via the Instant Payment Notification (IPN) service, it must be enabled for the seller sandbox account:

Step 1: Log in with the seller sandbox account at

Step 2: Click on 'Profile' under the 'My Account' tab.

Step 3: On the 'Profile' page, go to 'Instant Payment Notification Preferences'.

Step 4: Click on 'Choose IPN Settings' and enable IPN. The Notification URL has to be entered, but won't be used, so the value does not matter.


In order to test the payment flow in the development environment, there are two possible scenarios:

  • The development machine/server cannot be accessed externally by the PayPal IPN server (most common scenario). In this case add all domains used by the development server in the 'DebugDomains' setting in the Starter Site's 'web.config'. Multiple domains can be separated by the ',' character.

    These settings will make it possible to test the whole flow of a test payment, when the confirm page cannot be reached by PayPal. These settings are for the debugging purposes only and should not be used in any live situation.

  • The development machine/server can be accessed externally by the PayPal IPN server. In this case you can configure PayPal to test the payment flow. Remove the 'DebugDomains' setting from the payment module configuration.

    If there are problems with the PayPal Express Checkout payment module make sure that URL which you use as the IPN callback (NOTIFYURL) is on port 80 (or port 443 if you have an SSL certificate installed) and is publically accessible and exists within a firewall that does not prevent PayPal from connecting with it.

Test the payment/ checkout flow to see if everything works, using the newly configured payment methods and the correct payment statuses that are set.

Add-ons and ModulesPayPal Express Checkout