Add-ons and ModulesPayPal Payflow Link PSP

PayPal Payflow Link PSP

Sana Commerce 8.2
Your provider

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:

Step 1: Copy the 'Sana.Commerce.Payment.PayPal.PayflowLink.dll', 'Sana.Commerce.Payment.PayPal.PayflowLink.pdb' and 'Sana.Commerce.Payment.PayPal.PayflowLink.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 Payflow Link payment module. This configuration is performed in the 'web.config' file of the Sana Commerce frontend:

  • Locate the 'PayPal Payflow Link configuration section.txt' file in the 'configuration' folder, 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="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 and the chapter 'General External Payment Method Configuration Values'.

Step 3: 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 executing the 'ConfigurePayPalPayflowLinkInDB.sql' SQL script, from the 'scripts' folder, on the Sana Commerce database.

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

    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 executed, all fields should be checked for the correct values.

Step 4: Find the 'files' folder, where the PayPal (Credit card) 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: 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'.

Step 6: 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

Step 7: 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.

Step 8: 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.

Step 9: Test the payment/ checkout flow to see if everything works fine, 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.

Add-ons and ModulesPayPal Payflow Link PSP