Payflow Integration

Home: NPSF

Here is the Zip file download with the asp and webform pages. The ASP and HTML pages are also linked at the bottom of this doc.

Contents

Best Practice Overview

This best practice is primarily focused for non-profit organizations who accept donations and membership type payments over web. This shows a technique for getting the getting payment details entered through the Payflow online payments system to end up as leads within salesforce.com. The Leads Conversion tab that is normally installed in the non-profits instance is used to process/accept (convert) the payment.

Business Drivers

Non-profit organizations need quick and easy ways of processing membership renewals and donation payments. They typically have volunteers to do this type of work. This best practice provides a method of automating those processes by integrating them with salesforce.com. Best Practice Categories Salesforce Editions Professional Edition, Enterprise Edition, Unlimited Edition

Alternative Options

  1. Payment details can be imported as leads.
  2. There are many different options to payflow available for accepting online payments. A custom developed solution integrating with these options would be another alternative.

Skill Level Required

Advanced HTML knowledge, Javascript, ASP Script and Advanced Salesforce.com Administration skills are required.

Prerequisites

Access is required to the organizations website.

Links and further references

Community Posting: N/A

Sample Output

Sample Payment Input form

Image:Best_Practice_-_non_profits_-_Payflow_Integration_1.png

Credit card details

This is shown after pressing the “Donate Now” button on the previous screen. Image:Best_Practice_-_non_profits_-_Payflow_Integration_6.png

Payflow Order Confirmation

Image:Best_Practice_-_non_profits_-_Payflow_Integration_2.png

Transaction authorization

Please note, the techniques used in the best practice mean the lead is created in salesforce, even if the user does NOT press the Return to site button.

Image:Best_Practice_-_non_profits_-_Payflow_Integration_5.png

Lead in salesforce

The lead is loaded into salesforce. Use the Rapid Lead Convertor to convert the lead to a Contact/Donation record. I found it useful to modify the Rapid Lead Convertor to map payments of different types to different donation record types.

Image:Best_Practice_-_non_profits_-_Payflow_Integration_8.png

Detailed Implementation Steps

Step 1: Setup a Payflow Link test account

If you already have a Payflow account, it is recommended that you put the account into test mode whilst setting up the processing. Alternatively, you could setup another test account and use that to perfect the process.

To setup a test account, please follow the following step. From the www.paypal.com website, select the Merchant Services tab. Then click on the Payflow Gateway links and select Payflow Link. Follow the Payflow Link signup process. Cancel at the screen that asks for your credit card. A test account will have been created and your Credit Card is not needed. Off course, you can signup now or later for the full service.

Step 2: Setup a web form to Capture payment details

Incorporate the code from the attached example file (generic_donate.html).

Be sure to update the LOGIN value with your payflow link Login name.

Image:Best_Practice_-_non_profits_-_Payflow_Integration_3.png

Step 3: Create the web2lead post page.

This process uses the web2lead to post information from Payflow Link transaction into salesforce.com.

Update the attached example (payflow2sfdc.asp).

Use the generate web2lead function within salesforce.com to get details of field names required.

The example code includes some fields that were added to salesforce.com. These are highlighted in the screenshot below. These fields are: MemberId – A number field. Online Payment – A checkbox that shows this payment was received over the web. Trainsaction Id – A text field to contain the Payflow Link Transaction Id. This enables reconciliation between the two systems.

Be sure to make sure the oid is set to your organizations id. This value can be found in the HTML code generated by the web2lead function or on the Company Information screen within salesforce.

Image:Best_Practice_-_non_profits_-_Payflow_Integration_4.png

Step 4: Setup Payflow Link

Login into Payflow Manager and navigate to Payflow Link Info/setup.

Put the return URL as a LINK to your website.

Ensure Silent Post URL is ticked and it points to the payflow2sfdc.asp on your website.

Image:Best_Practice_-_non_profits_-_Payflow_Integration_7.png

Step 5: Testing the solution

I found it useful to first ensure that I had the payflow2sfdc.asp working correctly, before trying to fully test the end to end tests. To do this, change the Return URL method to “POST” and put the link as the ASP file, ie. http://www.yourorg.com.au/payflow2sfdc.asp. Then remove the silent POST URL.

The silent post URL is very useful to have on when going live. This routine will be called, even if the user closes the final screen and does not return to your website.

The following credit card numbers should work in test mode. Amounts of less than $1,000 dollars will be accepted. Amounts from $1,000 - $2,000 can return specific error codes and amounts greater than $2,000 are rejected. Please consult your payflow user manual for more details.

American Express 378282246310005

American Express 371449635398431

Amex Corporate 378734493671000

Diners Club 38520000023237

Diners Club 30569309025904

Di scover 6011111111111117

Discover 6011000990139424

MasterCard 5555555555554444

MasterCard 5105105105105100

Visa 4111111111111111

Visa 4012888888881881

Visa 4222222222222

Processor-specific Cards

Switch/Solo (Paymentech) 6331101999990016

Dankort (PBS) 76009244561

Dankort (PBS) 501971701010374

Supporting Files

Generic Donate HTML Page This file provides and example of an HTML form that could be used to capture the payee and payment details.

Payflow2sfdc ASP Page This is an ASP script file that uses the saleforce web2lead functionality to create a lead with the payment details.