You can use PayPal Payments Advanced as an additional payment gateway, meaning it can be used alongside a regular credit card payment gateway. With PayPal Payments Advanced, you give your customers the choice of paying with a PayPal account or using a credit card. 

 

Setting Up

To set things up on CoreCommerce's end, log into your CoreCommerce admin area, and go to Settings > Payment Settings.  Click on PayPal Payments Advanced to expand that section and tick the checkbox to enable it.

Make note of the Error URL and the Return URL; you'll have to use these values later on.

Partner, Merchant Login, User, and Password are your PayPal Manager login credentials.  If you're not sure about your Merchant Login name (a.k.a. vendor), more than likely it's your username.

Page Layout has to be set to the same thing you configure inside your PayPal Manager account.  This will control how the PayPal Payments Advanced payment form will be presented to your customers.  Layouts A and B cause the user to leave your site, go to PayPal's site, finish specifying payment information there and be sent back to your site to the order error or confirmation page.  Layout C keeps the user on your site by using an iFrame to communicate with PayPal.  Note that even if you use Layout C and the customer chooses to pay with PayPal (and not a credit card), they'll still be sent to PayPal's site.

Transaction Process Mode should be configured to reflect your PayPal Manager account status.

To set things up on PayPal's end:

  • Go to https://manager.paypal.com/ and log in.
  • Click on Service Settings in the top nav, then when the page loads, click on Set Up.
  • Choose either Live or Test for Transaction Process Mode. This must match the setting in your CoreCommerce admin.
  • Enter a Cancel URL. This is simply the page your customer will be sent to if they click the "Cancel and return to [store name]" link on PayPal's end. We would recommend either using your homepage, View Cart, or Checkout page URL.  Make sure that you enter a full, valid URL (don't forget to prepend http:// to the front) or your customers may be unable to check out because of errors such as "Field format error: 10472-CancelURL is invalid." returned by PayPal.
  • Input the Error URL value that you saw in your CoreCommerce admin.
  • Specify PayPal email address and PayPal Sandbox email address so that you can receive live and sandbox PayPal payments.
  • Set Show confirmation page to On my website.  Note that this is required.  Our implementation does not use the silent post feature so you have to show the confirmation page on your site, otherwise orders will not be sent back to your CoreCommerce admin.
  • Input the Return URL value that you saw in your CoreCommerce admin.
  • Set Return URL Method to Post.
  • Lastly make sure Enable Secure Token is set to Yes.
  • Everything else on this page is optional, so configure it as you see fit.
  • In order to choose which layout you want PayPal to use, go back to Service Settings and click on Customize. When the page loads you'll be able to choose between layouts A, B and C.  Make sure that whichever layout you choose on this screen matches your selection in CoreCommerce admin.

 

How do I test my solution?

You can easily test your solution using a test Payflow account.  You can find steps on how to create one here:

https://www.x.com/developers/community/blogs/pp_integrations_preston/testing-paypal-payflow-gateway

You can use the amount of the transaction to generate a particular result value. The following table lists the general guidelines for specifying amounts to submit in requests.
 
AmountResult
$0 – $1000RESULT value 0 (Approved)
$1001 – $2000Certain amounts in this range return specific PayPal results. You can generate the results by adding $1000 to that RESULT value.  For example, for RESULT value 13 (Referral), submit the amount 1013.  If the amount is in this range but does not correspond to a result supported by this testing mechanism, Payflow returns RESULT value 12 (Declined).
$2001+RESULT value 12 (Declined)

You can learn more in the Payflow Developer's guide available at https://www.x.com/developers/paypal/products/payflow-gateway

When you first start testing you will most likely keep getting response code 126 (at least if you're testing with a credit card) meaning your transaction triggered a fraud filter.  This will cause orders to be saved in CoreCommerce as Pending.  This happens because PayPal Manager has AVS fraud protection turned on by default and it will always fail since you're using test credit card numbers.  If you want to pass the AVS check and see orders saving as Approved in CoreCommerce, you'll have to temporarily disable AVS fraud filters.  To do that click on Service Settings inside your PayPal Manager account.  Then click Fraud Protection.  When the page load, click on Test Setup. Go to Edit Standard Filters.  Uncheck all the checkboxes and hit Deploy at the bottom.

Testing with a credit card

Follow these guidelines for testing:

  • While testing, use only the credit card numbers for testing. Other numbers produce an error.
  • Expiration date must be a valid date in the future.
  • If you're getting an authorization error in test mode, try lowering the charge amount.
Test Card Numbers
Card PlanCard Number
American Express
378282246310005
American Express
371449635398431
American Express Corporate378734493671000
Diners Club
38520000023237
Discover
6011111111111117
Discover
6011000990139424
JCB
3530111333300000
JCB
3566002020360505
MasterCard
5555555555554444
MasterCard
5105105105105100
Visa
4111111111111111
Visa
4012888888881881
Visa
4222222222222
NOTE: Even though this number has a different character count than the other test numbers, it is the correct and functional number.

* Please note that some of the numbers above may not work because they will fail additional credit card number security checks imposed by CoreCommerce

Testing with a PayPal account

When using PayPal Payments Advanced, your customers will have the option to pay with a credit card or their own PayPal account.  To test the latter, you'll have to create a developer PayPal account (discussed in the article above) and then add sandbox PayPal accounts inside your developer account that you will then be able to use to complete a transaction with PayPal Payments Advanced.

 

General Information

Based on your PayPal Manager settings, CoreCommerce may receive some address information from PayPal when an order is processed.  If this happens, CoreCommerce will update order address information to the received data but won't change the customer's address info.  Billing information received from PayPal may include: last name, first name, zip, city, state and address.  Shipping information received from PayPal may include: city, zip, address, state and country.

In most cases if the order is processed successfully by PayPal Payments Advanced, it will be saved in Approved status in CoreCommerce.  Sometimes though PayPal will send result value 126 to CoreCommerce.  This indicates that a transaction triggered a fraud filter. This is not an error, but a notice that the transaction is in a review status.  The transaction has been authorized but requires you to review and to manually accept the transaction before it will be allowed to settle.  In these cases the order will be saved in CoreCommerce in Pending status.