ConfigurationPayPal Payflow Link PSP Module

PayPal Payflow Link PSP Module

Configure a Test PayPal Payflow Link Payment Module

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

  • Copy the 'Sana.Commerce.Payment.PayPal.PayflowLink.dll', 'Sana.Commerce.Payment.PayPal.PayflowLink.pdb' and 'Sana.Commerce.Payment.PayPal.PayflowLink.xml' files from the PayPal release to the 'Frontend/Bin' folder of Sana Commerce;
  • Configure the Sana Commerce frontend to use the PayPal Payflow Link payment module. This configuration is performed in the Starter Site's 'web.config' file:
    • Locate the 'PayPal Payflow Link configuration section.txt' file, which contains the PayPal Payflow Link 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="PayPalPayflowLink" type="Sana.Commerce.Payment.PayPal.PayflowLink.PayflowLinkPaymentModule, Sana.Commerce.Payment.PayPal.PayflowLink">
  <settings>
    <clear/>
    <add name="IsFramed" value="false" isRequestParameter="false" />
    <add name="ResponseUseXml" value="false" isRequestParameter="false" />
    <add name="ResponseUsePost" value="true" isRequestParameter="false" />
    <add name="DebugDomains" value="localhost" isRequestParameter="false" />
    <add name="DebugConfirmUrl" value="checkout/PaymentConfirm.aspx?id={0}" isRequestParameter="false" />
    <add name="IpCheck" value="216.113.190.*|216.113.188.*|127.0.0.1" isRequestParameter="false" />
    <add name="PaymentPage" value="https://payflowlink.paypal.com" isRequestParameter="true" />
    <add name="LOGIN" value="…" isRequestParameter="true" />
    <add name="PARTNER" value="…" isRequestParameter="true" />
    <add name="SHOWCONFIRM" value="true" isRequestParameter="true" />
    <add name="ECHODATA" value="true" isRequestParameter="true" />
  </settings>
</module>

For an explanation of these configuration values, please read this chapter and the chapter 'PayPal Payflow Link Specific Configuration Values' below.

  • Configure the PayPal Payflow Link payment method. There are two ways to do this:
    • Configure the PayPal Payflow Link payment method in the backoffice. For more information read this chapter;
    • Configure the PayPal Payflow Link payment method by running the 'ConfigurePayPalPayflowLinkInDB.sql' SQL script in the Sana Commerce database.

      The 'ConfigurePayPalPayflowLinkInDB.sql' SQL script will add the 'PayPal (Credit card)' 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 run, all fields should be checked for the correct values.

      Before running the script make sure that you have changed the '@siteId' variable (if needed) to match the appropriate website identifier.

  • Request a test Payflow Link account from PayPal and modify the LOGIN and PARTNER to the login name and partner you have received from PayPal. For test accounts directly acquired from PayPal, the partner is 'PayPal'.
  • Configure the Payflow Link test account in the PayPal Manager backoffice (https://manager.paypal.com/) under 'Service Settings -> Configuration':

    Name Value
    Return URL Method Post
    Return URL http://<domain>/checkout/ordersubmit.aspx
    Silent POST URL (checkbox) Checked
    Silent POST URL http://<domain>/checkout/paymentconfirm.aspx>
    Force Silent Post Confirmation Checked
    Failed Silent Post Return URL http://<domain>/checkout/orderfailed.aspx
    Transaction Process Mode Test
  • In the PayPal Manager backoffice under 'Service Settings -> Configuration', uncheck all the checkboxes for Required Fields and Editable Fields under 'Billing Information' and 'Shipping Information'. This information will be provided by the Sana Commerce webshop.
  • Customize the look and feel of the Payflow Link pages in the PayPal Manager backoffice, under 'Service Settings -> Configuration'.

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 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' file. Multiple domains can be separated by the ',' character.

    To test successful orders, in the PayPal Manager backoffice change the Silent POST URL to a publicly accessible page that returns a HTTP status of 200.
    To test failing orders, change the Silent POST URL to a publicly accessible page that returns a HTTP status other than 200.

    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 debugging purposes only and should not be used in any live situation.

  • The development machine/server can be accessed externally by the PayPal server. In this case you can configure PayPal to test the payment flow. Remove the 'DebugDomains' setting from the payment module configuration. In the PayPal Manager backoffice configure the correct Silent POST URL of the development machine/server under 'Service Settings -> Configuration'.

    If there are problems with the PayPal Payflow Link payment module make sure that URL which you use as the Silent POST URL 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.
Fraud Protection Services Filter
Manual review of transactions that are flagged by Fraud Protection is not supported. Fraud Protection can be configured under 'Service Settings -> Fraud Protection' in the PayPal dashboard. There are two options to deal with the reviewing of transactions:

Set all filters to 'Reject' instead of 'Review'
This setting will automatically reject all the transactions that are flagged by Fraud Protection. This may result in the rejection of valid transaction. If you choose to leave the settings on 'Review', then you should never approve a transaction manually, because these orders will not be handled by Sana Commerce.

Disable all filters
If you disable all filters, Fraud Protection will be effectively disabled. Any suspicious transaction that would otherwise be flagged by Fraud Protection, will automatically be approved. This may result in the approval of fraudulent transaction.

ConfigurationPayPal Payflow Link PSP Module