Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gateways:paypal:express_checkout [2017/02/20 06:46] – [Subscriptions and Recurring Billing with PayPal Express Checkout] adamgateways:paypal:express_checkout [2022/03/25 21:03] (current) – [PayPal Express Checkout] marija
Line 1: Line 1:
 ---- dataentry gateway ---- ---- dataentry gateway ----
-type            : gateway         # do not change this line+type                   : gateway # do not change this line 
 +name                   : PayPal Express Checkout #  
 +countries              : AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, MS, MA, MZ, MM, NA, NR, NP, NL, AN, NC, NZ, NI, NE, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, SH, KN, LC, PM, VC, WS, SM, ST, SA, SN, CS, SC, SL, SG, SK, SI, SB, SO, ZA, GS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW #  
 +support-added          : 0.6.0 #  
 +support-removed        :  #  
 +supports-3dsecure      : yes #  
 +supports-multicurrency : yes # enter "yes" or "no" (without quotes) 
 +gateway_url            : http://www.paypal.com/ #  
 +----
  
-# Add the full name of the gateway after the colon below. 
-name            : PayPal Express Checkout 
- 
-# Supported Countries. Please use 2-character ISO Country Codes available at 
-# http://www.iso.org/iso/english_country_names_and_code_elements 
-# Separate multiple country codes by commas. 
-countries       : AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, MS, MA, MZ, MM, NA, NR, NP, NL, AN, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, SH, KN, LC, PM, VC, WS, SM, ST, SA, SN, CS, SC, SL, SG, SK, SI, SB, SO, ZA, GS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW 
- 
-# Enter the FoxyCart versions where support was added or removed (if applicable). 
-# Version numbers should include applicable decimals, such as "0.7.0" and not "070" 
-support-added   : 0.6.0 
-support-removed : 
-supports-multicurrency  : yes # enter "yes" or "no" (without quotes) 
- 
-# Gateway URL 
-gateway_url     : http://www.paypal.com/ 
----- 
  
  
Line 26: Line 17:
 [[https://www.paypal-marketing.com/emarketing/partner/directory/directory.page#m=p&n=24657428861|{{:gateways:paypal:pp_partner_logo_rgb.jpg?nolink |FoxyCart is a PayPal Gold Partner }}]] [[https://www.paypal-marketing.com/emarketing/partner/directory/directory.page#m=p&n=24657428861|{{:gateways:paypal:pp_partner_logo_rgb.jpg?nolink |FoxyCart is a PayPal Gold Partner }}]]
 FoxyCart is proud to be a [[https://www.paypal-marketing.com/emarketing/partner/directory/directory.page#m=p&n=24657428861|PayPal Gold Partner]]. FoxyCart is proud to be a [[https://www.paypal-marketing.com/emarketing/partner/directory/directory.page#m=p&n=24657428861|PayPal Gold Partner]].
 +
 +<WRAP center round important 100%>
 +**Version 2.0**: Note that we no longer recommend using the PayPal Express Checkout option for PayPal-hosted payment, except in very specific cases. Our **PayPal Checkout** option under the [[gateways:paypal:commerce_platform#paypal_checkout|PayPal Commerce Platform]] option provides an updated version of the PayPal-hosted option.
 +</WRAP>
  
 ===== What It Is ===== ===== What It Is =====
Line 39: Line 34:
 {{ :gateways:paypal:screen_shot_2016-10-03_at_3.33.05_pm.png?nolink&600 |}} {{ :gateways:paypal:screen_shot_2016-10-03_at_3.33.05_pm.png?nolink&600 |}}
  
-FoxyCart currently has two different integrations for PayPal Express Checkout in FoxyCart 2.0 - "PayPal Express Checkout (Reference Transactions)" and "PayPal Express Checkout (Legacy)". Generally speaking, you will want to use the "Reference Transaction" integration for your store. The main difference between the two integrations is how subscriptions are handled - with the Reference Transactions integration providing a superior experience for customers and store administrators. +FoxyCart currently has two different integrations for PayPal Express Checkout in FoxyCart 2.0 - "PayPal Commerce Platform" and "PayPal Express Checkout (Legacy)". Generally speaking, you will want to use the "Commerce Platform" integration for your store. The main difference between the two integrations is how subscriptions are handled - with the Commerce Platform integration providing a superior experience for customers and store administrators. For FoxyCart versions 1.1 and older, the single PayPal Express Checkout integration is the same as our "Legacy" integration in 2.0.
  
-When using PayPal to sell subscriptions with the Reference Transactions integration, it does require enabling a feature within your PayPal account that isn't available in all countries. Review the subscriptions section below for more details on this. If you're not sure, please reach out to us and we'll be happy to help you out.+When using PayPal to sell subscriptions with the Commerce Platform integration, it does require enabling a feature within your PayPal account that isn't available in all countries. Review the subscriptions section below for more details on this. If you're not sure, please reach out to us and we'll be happy to help you out.
 ==== Setting Up Your Currency ==== ==== Setting Up Your Currency ====
 Because PayPal Express Checkout (unlike most gateways) can accept a variety of currencies, it's important to set your currency in your FoxyCart admin's "settings" page, through the "store locale" option. Otherwise it may default to the USD, which may not be what you're after. Because PayPal Express Checkout (unlike most gateways) can accept a variety of currencies, it's important to set your currency in your FoxyCart admin's "settings" page, through the "store locale" option. Otherwise it may default to the USD, which may not be what you're after.
Line 56: Line 51:
 If you are selling subscriptions or recurring billing products through FoxyCart and are offering PayPal as a payment option, <wrap important>you must complete the steps here</wrap>. If you are selling subscriptions or recurring billing products through FoxyCart and are offering PayPal as a payment option, <wrap important>you must complete the steps here</wrap>.
  
-<wrap important>FoxyCart's legacy PayPal Express Checkout integration has some limitations regarding subscriptions which you should be aware of.</wrap> Because of these limitations, the PayPal Express Checkout integration in FoxyCart version 1.1, and the PayPal Express Checkout (Legacy) integration in version 2.0, does not allow users to modify their carts via the ''sub_token''. You also can not have a subscription with a start date in the future if you're using the legacy Express Checkout integration. Beginning with 2.0, our new PayPal Express Checkout (Reference Transactions) integration does support native FoxyCart subscriptions, meaning you can use the ''sub_token'' to work with PayPal subscriptions. Here are some additional limitations as described in PayPal's documentation:+<wrap important>FoxyCart's legacy PayPal Express Checkout integration has some limitations regarding subscriptions which you should be aware of.</wrap> Because of these limitations, the PayPal Express Checkout integration in FoxyCart version 1.1, and the PayPal Express Checkout (Legacy) integration in version 2.0, does not allow users to modify their carts via the ''sub_token''. You also can not have a subscription with a start date in the future if you're using the legacy Express Checkout integration. Beginning with 2.0, our new PayPal Commerce Platform integration does support native FoxyCart subscriptions, meaning you can use the ''sub_token'' to work with PayPal subscriptions. Here are some additional limitations as described in PayPal's documentation:
  
   * To be able to create a recurring payments profile for the buyer, you must ensure that the buyer's PayPal account includes an active credit card.   * To be able to create a recurring payments profile for the buyer, you must ensure that the buyer's PayPal account includes an active credit card.
   * You can increase the profile amount by only 20% in each 180-day interval after you create the profile.   * You can increase the profile amount by only 20% in each 180-day interval after you create the profile.
   * For recurring payments with the Express Checkout API, PayPal does not allow certain updates, such as billing amount, within 3 days of the scheduled billing date.   * For recurring payments with the Express Checkout API, PayPal does not allow certain updates, such as billing amount, within 3 days of the scheduled billing date.
 +
 +There is also an additional limitation if you have subscriptions that are only intended to run once and never renew. For example, a subscription add to cart URL that looks like ''&sub_frequency=1m&sub_enddate=1m'', meaning the subscription will end on the same day that it is meant to next renew. In these instances, PayPal won't cancel that subscription correctly, but will instead continue to renew the subscription indefinitely. It will instead need to be cancelled manually.
  
 <WRAP important round> <WRAP important round>
Line 69: Line 66:
  
 === Part 1: Set up the IPN === === Part 1: Set up the IPN ===
 +
 +<wrap tip>Please note that PayPal updates their UI fairly regularly, and their own documentation often doesn't actually line up with how to access certain settings. If you have an issue with the following, please let us know so we can try to update things.</wrap>
  
 FoxyCart's integration with PayPal's [[https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/howto_admin_recurringpayments|recurring payments]] system requires the use of PayPal's [[https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/|Instant Payment Notification]] (IPN) system in order to keep our system and their system in sync after each transaction is processed (or fails to process). Follow these steps to activate your IPN: FoxyCart's integration with PayPal's [[https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/howto_admin_recurringpayments|recurring payments]] system requires the use of PayPal's [[https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/|Instant Payment Notification]] (IPN) system in order to keep our system and their system in sync after each transaction is processed (or fails to process). Follow these steps to activate your IPN:
  
-  - Login to the PayPal. +  - Login to PayPal. 
-  - Go to More-> Settings. (If you don't see thisskip to the next step.) +  - In the top right hand cornerclick the gear / settings icon, then click "Account Settings"
-  - Go to your Profile->My Selling Tools. (If you don't see thistry to find something like "Selling Preferences".) +  - In the left hand sideselect "Notifications". 
-  - Under "Getting Paid and managing my risks" click the "Update" to the right of "Instant payment notifications"(If you don't see this, try to find a link that says "Instant Payment Notifications" and click that.)+  - In the "Instant payment notificationsrow, click the "Update" to the right of "Instant payment notifications".
   - Click the "Choose IPN Settings" button. \\ {{:docs:paymentgateways:paypal_ipn_step3.jpg}}   - Click the "Choose IPN Settings" button. \\ {{:docs:paymentgateways:paypal_ipn_step3.jpg}}
   - Enter ''https://yourdomain.foxycart.com/ipn.php'', but replace the ''yourdomain.foxycart.com'' with your full FoxyCart store domain. (If you're using a remote store domain like ''store.example.com'' then use that.) \\ {{:docs:paymentgateways:paypal_ipn_step4.jpg}}   - Enter ''https://yourdomain.foxycart.com/ipn.php'', but replace the ''yourdomain.foxycart.com'' with your full FoxyCart store domain. (If you're using a remote store domain like ''store.example.com'' then use that.) \\ {{:docs:paymentgateways:paypal_ipn_step4.jpg}}
Line 85: Line 84:
 === Part 3: Enable "Reference Transaction" Support === === Part 3: Enable "Reference Transaction" Support ===
  
-<wrap important>This step is required only for the "PayPal (Reference Transactions)" payment option</wrap>+<wrap important>This step is required only for the "PayPal Commerce Platform" payment option</wrap>
  
 Reference Transactions is PayPal functionality that allows FoxyCart to create a billing agreement with your store's customers who wish to pay with PayPal, to allow us to continue to charge your subscription customers at each renewal. It's not enabled by default though for your account, and so you need to contact PayPal to ask for it to be enabled. Reference Transactions is PayPal functionality that allows FoxyCart to create a billing agreement with your store's customers who wish to pay with PayPal, to allow us to continue to charge your subscription customers at each renewal. It's not enabled by default though for your account, and so you need to contact PayPal to ask for it to be enabled.
  
-Our PayPal rep has let us know that the best number for FoxyCart users in the US to call to get Reference Transaction support enabled for their accounts is 888-215-5506. For our users outside of the US, you can reach out to your local PayPal support number - after logging into your account, select "Help & Contact" at the bottom of the page, followed by "Call Us" to see the number for your region. Let them know you'd like to have Reference Transaction support enabled for your PayPal account. If you have any trouble, please [[http://www.foxycart.com/contact|let us know]] and we'll help walk you through it.+Our PayPal rep has let us know that the best number for FoxyCart users in the US to call to get Reference Transaction support enabled for their accounts is 1-888-221-1161. For our users outside of the US, you can reach out to your local PayPal support number - after logging into your account, select "Help & Contact" at the bottom of the page, followed by "Call Us" to see the number for your region. Let them know you'd like to have Reference Transaction support enabled for your PayPal account. If you have any trouble, please [[http://www.foxycart.com/contact|let us know]] and we'll help walk you through it.
  
-<wrap important>Failure to have Reference Transactions enabled for your account will result in subscriptions not renewing successfully, and PayPal based subscriptions will need to be cancelled and restarted.</wrap>+<wrap important> 
 +Failure to have Reference Transactions enabled for your account will result in customer attempts to purchase subscriptions failing - returning the customer to the checkout with an error. 
 +</wrap>
  
 === Part 4: Testing === === Part 4: Testing ===
Line 97: Line 98:
  
 For more details about recurring payments, please see [[https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/integration-guide/ECGettingStarted/|PayPal's documentation]]. For more details about recurring payments, please see [[https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/integration-guide/ECGettingStarted/|PayPal's documentation]].
 +==== Authorize Only ====
 +
 +If you would like to only authorize payments from customers, and then manually capture the funds later, this can be enabled using the "authorize only (do not capture funds)" checkbox.
 +
 +Note that enabling this option requires that you also grant API permissions for Foxy to be able to authorize payments on behalf of your account. Review the "[[#subscriptions_and_recurring_billing_with_paypal_express_checkout|Subscriptions and Recurring Billing with PayPal Express Checkout]]" section above, and in particular Part 2, for details on doing that.
 +
 +==== PayPal Credit ====
 +
 +Foxy v2.0 and above support PayPal Credit. It can be enabled by a simple checkbox in the PayPal settings. For more, please [[https://www.foxy.io/blog/gateway-improvement-paypal-credit/|see our blog post about PayPal Credit]].
 +
 ==== Errors? ==== ==== Errors? ====
 If you're doing subscriptions via PayPal Express or if you see the following error in your store's error logs: If you're doing subscriptions via PayPal Express or if you see the following error in your store's error logs:
Line 116: Line 127:
   - In your FoxyCart admin, go to the [[https://admin.foxycart.com/admin.php?ThisAction=EditPaymentGateway|Edit Payment Gateway]] section and input your seller email account for both the PayPal Express Checkout //and// the PayPal Payments Pro email values. (See the image on the right for reference)   - In your FoxyCart admin, go to the [[https://admin.foxycart.com/admin.php?ThisAction=EditPaymentGateway|Edit Payment Gateway]] section and input your seller email account for both the PayPal Express Checkout //and// the PayPal Payments Pro email values. (See the image on the right for reference)
   - Attempt a checkout FoxyCart's PayPal Express Checkout <wrap important>//from the same browser that you are already logged into the PayPal Sandbox from//</wrap>. Use the test buyer email address to complete the payment. Again, because you have to be logged into the PayPal Sandbox to process a test transaction it //will not work// unless you're both logged into the sandbox and attempting your FoxyCart checkout flow in the same browser.   - Attempt a checkout FoxyCart's PayPal Express Checkout <wrap important>//from the same browser that you are already logged into the PayPal Sandbox from//</wrap>. Use the test buyer email address to complete the payment. Again, because you have to be logged into the PayPal Sandbox to process a test transaction it //will not work// unless you're both logged into the sandbox and attempting your FoxyCart checkout flow in the same browser.
-  - <wrap hi>If you want to test subscriptions</wrap>, login to your [[https://www.sandbox.paypal.com/|sandbox PayPal account]] as the test seller account. From there, you will need to follow the details as described above for setting up support for subscriptions, with the exception that you'll need to enter the IPN url as ''sandbox_api1.foxycart.com'' instead of ''billing_api1.foxycart.com''. If it prompts you that ''sandbox_api1'' isn't a valid third party URL, ensure that you're still logged into the Sandbox and not PayPal proper.+  - <wrap hi>If you want to test subscriptions or authorize-only transactions</wrap>, login to your [[https://www.sandbox.paypal.com/|sandbox PayPal account]] as the test seller account. From there, you will need to follow the details as described above for setting up support for subscriptions, with the exception that you'll need to enter the IPN url as ''sandbox_api1.foxycart.com'' instead of ''billing_api1.foxycart.com''. If it prompts you that ''sandbox_api1'' isn't a valid third party URL, ensure that you're still logged into the Sandbox and not PayPal proper.
 ==== Test Card Numbers ==== ==== Test Card Numbers ====
 Review the test account you created (above). All test information should be there. <wrap help>Know more? Feel free to edit this page with info.</wrap> Review the test account you created (above). All test information should be there. <wrap help>Know more? Feel free to edit this page with info.</wrap>

Site Tools