Overview

You should already have a PayPal Payflow Pro Gateway setup. Payflow Pro is different from PayPal. You can sign up for a Payflow Pro Gateway by going to the Payflow Pro sign up form.

This guide shows you how you can easily connect the PayPal Payflow Pro payment gateway to Salesforce, in order to charge credit cards directly from Salesforce, either via embedded buttons or scheduled batches for recurring payments.

Payflow is PayPal’s secure, open payment gateway. With Chargent’s ability to send payments directly from Salesforce to Payflow using an API, you can have total control over the payment process. Payflow allows merchants to choose any Internet Merchant Account to accept debit or credit card payments and connect to any major processor. You can also select PayPal as your credit card processor.

Note: This is primarily a synchronous integration, meaning that transactions sent to PayPal Payflow Pro from Salesforce will receive the PayPal Payflow Pro responses (approved / declined with related information) and store them in Salesforce. Transactions that are not initiated from Salesforce (if any) will not be synced from PayPal Payflow Pro to Salesforce.

Installation and Configuration of Chargent

  1. Install both Chargent Base and Chargent Transactions into your Salesforce org.
  2. Configure Chargent according to the step-by-step Installation and Setup Guide.

Connecting PayPal Payflow Pro & Salesforce using the Chargent Setup Wizard

  1. Click on the App Launcher on the top left side in Salesforce.
    app
  2. Select Chargent as the App
  3. Select the Chargent Settings Tab
  4. Choose Chargent Setup Wizard
  5. Do you have a Payment Gateway account – Select Yes
  6. Select Payflow Pro (PayPal) as your Payment gateway
  7. Select Test Transactions for testing or Live Transactions if you are looking to process real time payments.
  8. Follow the prompts to configure your gateway.

You will need the following information:

  • Add your credentials based on your Sandbox or Live Payflow Pro account.
    • Merchant Login that you login to Payflow Pro with
    • Password from Payflow Pro
    • Partner ID from Payflow Pro
      • (for the test account it will be “PayPal”, but for production if you signed up through a Bank rather than directly with PayPal it may be different)
    • Username (User Login): You can get this by logging into your Payflow Pro account, and clicking Account Administration, and either “Manage Users” or “Add User” if you don’t already have User Login created.
  • Will you be using tokenization? (recommended)
  • What currency will you be using? (USD, CAD, etc..)
  • What payment methods will you be accepting?
  • Credit cards and/or ACH (electronic check)
    • What Credit Card types will you be accepting? (Visa, Mastercard, etc…)
  • Payment Console Setup (Premium feature for Platform Edition)
    • Show Charge Button
    • Show / Create Update Token Button
    • Show Authorize Button

Configure your PayPal Fraud Settings

Even though you have set up a test account, PayPal uses the same security as their regular accounts, to provide as close to the live experience as possible. So you may need to adjust your Fraud Settings or you will sometimes receive an error with message “Under Review by Fraud Service” when submitting test transactions.

  • Go to Service Settings > Fraud Protection > Test Setup > Edit Standard Filters
  • Change the settings as desired for testing and click Deploy
  • Go to Account Administration > Transaction Settings to set a maximum amount per transaction as well.

Payflow PayPal Fraud Setup

Note: You may also need to whitelist your IP address for testing.

  • Go to Service Settings
  • Fraud Protection
  • Manage Standard Filter Lists
  • Edit
  • Enter IP Address in the box
  • Click Add
  • Click Save

modify

Testing using Chargent Anywhere

About Test Transactions

Test transactions are simulated and do not incur any fees or have any money change hands. When you check the Test Endpoint box on the Gateway record in your Salesforce Production Org, Chargent sends your transactions to a test server. If you are in your Salesforce Sandbox it will automatically send the transaction to your test environment with your gateway.

Testing with Payment Console

To test using the Payment Console, you want to navigate to any record in your Sandbox that has the Chargent Anywhere Component enabled.

  1. Click the [PaymentConsole] button
  2. If you are using multiple gateways select your gateway from the dropdown otherwise continue to step 3
  3. Enter all the Billing Information and click [Next]
  4. Enter in a Payflow Pro test credit card numberSee above note to generate an approval
  5. Click the [Charge] button.

You should receive a green box showing Approved.

Testing using Payment Request

To test using a Payment Request you want to be sure you have the Chargent Payment Request feature set up as outlined in our documentation.

  1. Click the [Send Payment Request] button
  2. If you have multiple Payment Request templates set up you will first choose what template you want to use.
  3. Enter an email address where you want to send the test Payment Request along with any amount.
  4. Enter a Contact name (Optional)
  5. Click the [Send Request] button

Send Payment Request

When you receive the email, click the secure link for the Payment Request. Use one of Payflow Pros credit cards or bank account testing numbers to complete the payform and submit the payment.

Card Bank Payment

You should receive a green box confirmation

Card Bank payment

Testing ACH / Electronic Check using Payflow Pro from Salesforce

Please make sure you have ACH enabled with PayPal Payflow Pro first, otherwise you will run into errors.

Testing for ACH is done using the same process as with Credit Cards using Chargent Anywhere, however you want to make sure to select ‘Bank Account’ and use the Payflow Pro testing Account Number and Routing Numbers.

Viewing the Transaction in PayPal

To view the Credit Card Processor that you have selected for testing, see the PayPal Manager.

If you receive an Error and the test transaction is not approved, you may need to adjust the Fraud settings in the PayPal Manager under Service Settings > Fraud Manager > Test Settings

  • You may need to disable AVS matching to get approved test transactions
  • Sign into the PayPal Manager interface to see the test transactions under Search Transactions – (Use the First Name to search for the transaction).

search

Your connection between Salesforce and PayPal Payflow Pro is now set up and working. Let’s proceed to the final tests before the system goes live.

PayPal Payflow Pro Test Credit Card Numbers

Credit Card Test Card Number
Visa 4111111111111111
Visa 4012888888881881
Visa 4222222222222
MasterCard 2221000000000009
MasterCard 2223000048400011
MasterCard 2223016768739313
MasterCard 5555555555554444
MasterCard 5105105105105100
American Express 378282246310005
American Express 371449635398431
American Express Corporate 378734493671000
Discover 6011111111111117
Discover 6011000990139424
Diners Club 30569309025904
JCB 3530111333300000
JCB 3566002020360505

PayPal Payflow Pro Test ACH Numbers

Account Number 1111111111
Routing Number 111111118

Sending Live Transactions from a Salesforce Sandbox

When Chargent is installed in a Salesforce Sandbox, transactions are typically sent to the payment gateway’s test / sandbox / development environment, regardless of whether Chargent’s Test Endpoint checkbox is checked. This is done as a security precaution, to prevent real transactions from being accidentally sent from a Salesforce Sandbox.

When Chargent is installed in a production or developer Salesforce org, checking the Test Endpoint checkbox on the Gateway record will route transactions to the test environments provided by the gateway.

Note: Some gateways use the same endpoint for live and test environments. For these gateways, the Chargent application does not prevent live transaction processing. As such, it is best practice to deactivate your live gateway records in orgs used for testing.

If you wish to send live transactions from a Salesforce Sandbox, as a final step in testing, simply use Chargent’s Endpoint Override field on the Gateway record, and enter the production endpoint of your chosen gateway there.

Here is the production endpoint URL for Chargent’s integration with PayFlow Pro:

  • https://payflowpro.paypal.com

Note that the full endpoint URL must be entered in the Endpoint Override field, and the domain must be present in the Remote Site Settings (for standard Chargent integrations it should be already present).

Going into Production

There are many options for additional customization of how Chargent works within Salesforce beyond the basic setup described above. Once you have configured Chargent to your satisfaction, and have completely set up and tested any integration or automation with your other business processes, it is time to move into production.

Your Payflow account and associated services can have either a Test or a Live status

Test: All transaction information is sent to test servers at PayPal. You should run transaction or configure settings in Test status to get comfortable with the services. No money trades hands in test transactions. For services, when you purchase a service, it is in Test status. Configure the service as per your business needs when it is in Test status.

Live: All transactions that you submit are sent to the financial institutions for processing and real money is transferred. For your services, the settings that you configured when in Test status go into effect, and impact your transactions accordingly.

Once you have completed your testing, you can activate your Payflow account by clicking on the Activate Your Account button which is located under the Your Account Status section of the PayPal Manager Home page. This will allow you to process transactions using real currency. Active accounts perform Live transactions.

account

Live versus Test Mode

When you log on to PayPal Manager you will be notified which mode your account is in.

When your account is active and Payflow is in Live Status, you still have the option to troubleshoot problems by submitting test transactions. Just check the Test Endpoint button on the Chargent Gateway record to send a transaction to the test server, and use a test credit card account number.

Because your Payflow account will now have a history of both Test and Live transactions, PayPal Manager allows you to specify which type of transaction to view or perform. For active accounts, the Transaction Mode field appears on task pages to enable you to specify either Test or Live transactions.

Once Payflow Status is Live, you may wish to run some additional Test transactions

  • Just leave the Test Endpoint checkbox in the gateway checked

If your test transactions in both Test and Live Status were successful, you are ready to run Live transactions with PayPal’s Payflow Pro and Salesforce.

  • Uncheck the Test Endpoint checkbox in your Salesforce Gateway record
  • Check to make sure the Transaction Process Mode in the PayPal Manager is set to LIVE
  • You can now run live transactions using valid credit card numbers
    • If you wish to test some live transactions with your own credit card, you can void them immediately after, to prevent the transactions from settling. Just go to the transaction record in Salesforce and click the Void button.
    • If you do run live transactions as a test, it is recommended to make them very low amounts to minimize any impact, in the event you forget to void them.
    • For Visa live transaction tests, you can submit $0.00 transactions

transaction

Tokenization

Tokenization with PayPal’s Payflow Pro gateway operates differently than other payment gateway integrations in Chargent. Payflow Pro uses both Reference Transaction tokens and Recurring Billing Profile IDs.

Reference Transaction tokens expire in 12 months and are simply the previous transaction ID which can be used to submit a new transaction. The token is submitted instead of sensitive cardholder data, PayFlow Pro will draw all necessary payment data from previous transaction.

Recurring Payment Profile’s don’t expire. Generally, that is more reliable way to process recurring charges against the user’s payment data, however it doesn’t support Authorization transaction type. In case Recurring Payment Profiles are enabled, the Reference Transaction token will still be used to submit Authorization transactions.

    • Chargent Token field = PayPal Reference Transaction
    • Chargent Customer Token field = PayPal Recurring Profile ID

Payflow Use Recurring Profiles

For versions prior to 5.40, PayPal Payflow Pro requires you to have the Recurring Billing service enabled on their side in order to have tokenization enabled in Chargent.

New in Chargent 5.40 is the “PayFlow Use Recurring Profiles” setting on the Gateway record. If this field is checked, both Reference Transactions and Recurring Profiles will be created and used by Chargent for different situations.

Chargent creates two kinds of tokens with PayPal, to ensure that future transactions can work without any issues around expiration. This new field in the Gateway settings, “Payflow Use Recurring Profiles”, when enabled will do the following:

    • Chargent establishes a Recurring Profile with PayPal and stores it in the Customer Token field, using it for any future transactions. Recurring charges will still be handled by Chargent. The Recurring Profile is simply used to create a perpetual token, not to make any recurring charges.
    • Authorizations and Charge Authorized calls will use the Reference Transaction, stored in the Token field, since these transaction types are not supported by PayPal’s Recurring Profiles. Charge transactions will use the Recurring Profile, unless this setting is disabled, in which case it will use the Reference Transaction. Note that Reference Transactions expire in 12 months, so the use of Recurring Profiles should be enabled for annual billing.
    • ​If a Reference Token exists then a new Recurring Profile will be created from Reference Token, no CC data will be required (unless Reference Token is expired)

If the “Payflow Use Recurring Profiles” field is unchecked, the Recurring Token will never be used, even if the field has been populated.

To set up reference transactions / Tokenization in Salesforce:

In PayPal Manager Reference Transactions are disabled by default.

  • Go to Account Administration > Transaction Settings to enable them

settings

In Salesforce

  • Check the Use Tokenization checkbox in the Chargent Gateway record you have set up for Payflow Pro
  • Check the PayFlow Use Recurring Profiles checkbox in the Chargent Gateway record if you wish to use tokens longer than 12 months (You may need to add this field to your Page Layout if you are on v5.40 and don’t see it)
  • Set the Credit Card Handling field (unless you are using Payment Console)
    • Never Clear: Chargent will not remove any card data automatically.
    • Clear After Successful Charge: Chargent will clear the credit card number, expiration dates and card security code only after a successful charge is run.
    • Clear After All Transactions: The credit card number, expiration date and card security code will be erased after any transaction (Charge, Void, Refund)
    • Clear When Token Present (Recommended): Only when a token is present in the token field, will the credit card number, expiration date and card security code be cleared.

When your first successful charge goes through, the Credit Card Number field value will be deleted, and a token will be stored for future transactions (or if you are using Chargent’s Payment Console feature, the card number was never stored during the generation of the token)

After a successful transaction, the Reference Transaction will be stored in the Token field. PayPal’s Profile ID will be stored in the Customer Token field

Notes on Payflow Reference Transactions from Salesforce

  • The token returned in the original transaction is valid for use in reference transactions for 12 months.
    • Charge and authorization transactions can use a reference transaction as a source of transaction data. Payflow looks up the reference transaction and copies its transaction data into the new sale (charge) or authorization.
    • Fraud Protection Service filters do not screen reference transactions.
    • The Billing Name and Address, and Card Expiration Date are copied from the reference transaction into the new charge or authorization transaction (if they exist in the original transaction). If you provide a value for any of these parameters when submitting the new transaction, then the new value is used.
    • Reference transactions can be used for recurring billing, or to capture additional funds as part of a transaction (for example, capturing an upgrade charge that comes after an initial transaction).

Salesforce to PayPal Field Mapping

Here are a few relevant fields and their mappings between the Chargent software in Salesforce and the PayPal Payflow Pro system.

Salesforce Direction PayPal
Gateway ID < Transaction ID
Authorization < Authorization Code
Invoice Number > Supplier Reference #
Order Information > Comment 2
Salesforce record ID (of Chargent Order, Opportunity, or Case) > Customer Code

Congratulations! You have successfully integrated Salesforce and PayPal Payflow Pro, using the Chargent Payment Processing for Salesforce software. You can now process one-time or recurring credit card payments through PayPal Payflow Pro directly from Salesforce.

If you have any questions or need assistance, please contact us