Nowadays, PayPal is considered the most preferred online payment around the world for its convenience and safety. In Magento 2, your store can allow the customers to make payments through debit, credit cards, and PayPal as well. There is an array of PayPal payment options; however, in this Magento 2 tutorial, we will give you detailed instructions on how to set up the PayPal Express Checkout only.
What Is Paypal Express Checkout In Magento 2?
This PayPal Express Checkout payment method in Magento 2 might contribute to enhancing your sales since it allows the buyers to pay by either their credit card or PayPal account.
Below is the checkout flow using the PayPal Express Checkout in Magento 2 stores:
- The users click the “Check out with PayPal” button (on the product pages/ cart pages/ shopping cart pages)
2. They are redirected to the site of PayPal
3. They need to log in to their PayPal account to pay for the orders
4. After completing the transaction, the users are sent back to the Magento store
5. They will place the order on the Magento site
6. The order information will be transferred via PayPal APIs to PayPal for settling the transaction.
How To Set Up Paypal Express Checkout In Magento 2?
- Step 1: Set up your merchant account on the PayPal website
First, go to manager.paypal.com to log in to your PayPal business account.
(Notes: You need to have a PayPal Business account instead of a Personal PayPal account. Your customers can use their Personal account to pay for their orders on your site, but you must have a Business account to accept online payments via PayPal).
Second, go to Service Settings > Hosted Checkout Pages > Set Up; and then, set AVS and CSC to No, and Enable Secure Token to Yes > Save the settings.
Third, set up an additional user.
Fourth, go to Required PayPal Setting, set your email address. API Authentication Methods, Sandbox Mode, and API use proxy.
Fifth, set Enable this Solution to Yes.
Save all configs to complete and move to the next step.
- Step 2: Open PayPal Checkout Configuration in Magento backend
Go to Admin panel, navigate to STORES, click on Configuration (under Settings)
(Admin panel => STORES => Configuration)
On the left menu, expand the SALES section and choose Payment methods in the dropdown.
Next, choose the country where your business is currently located.
Then, click on Configure in PayPal Express Checkout to start the configuration.
- Step 3: Fill in Required Settings
First, enter the email address that was specified in your PayPal merchant account.
Second, set API Authentication Methods to API Signature/ API Certificate.
Third, enter your API Username, API Password and API Signature. The fastest way is to click on Get Credentials from PayPal to connect with your PayPal account and get this information.
Fourth, in case you use credentials from Sandbox, set Sandbox mode to Yes.
Fifth, if you utilize a proxy server to connect your Magento store with PayPal then set APU Uses Proxy to Yes. After that, enter Proxy Host and Port.
Sixth, choose Yes for Enable this Solution.
Seventh, if your store allows PayPal Credit for your customers, set Enable PayPal Credit to Yes.
- Step 4: Fill in Basic Settings
First, set the title for this payment method (you can leave it as default).
Second, set order for PayPal Payment Standard besides other payment methods. (For example, you set order to 0, this method will appear in the first place).
Third, choose a Payment Action among Authorization/ Sale/ Order. To fully understand the differences among these 3 types, please click here to read PayPal policies.
If you choose Order for Payment Action, it will appear 3 more fields to complete. Then, you have to enter the number of days during which the primary authorization/ order is valid and the maximum number of authorization for a single order.
- Step 5: Fill in Advanced Settings
Moving to the Advanced Settings. First, you must set Display on Shopping Cart to Yes.
Second, choose all/ several countries where this payment method is accepted.
Third, set Debug Mode to “Yes” to write communications with the payment system into the log
file. The log file for PayPal Payments Advanced is payments_payflow_advanced.log.
Fourth, set Enable SSL Verification to Yes to enable host authenticity verification.
Fifth, set Transfer Cart Line Items to Yes to show order summary by line item from the PayPal website.
Sixth, if you want to display up to 10 shipping options in the order summary, set Transfer Shipping Options to Yes.
Seventh, set Shortcut Buttons Flavor to Dynamic – show an image that can be updated from PayPal or Static – show a fixed image.
Eighth, set Enable PayPal Guest Checkout to Yes in order to allow customers to make payments with this PayPal even when they don’t have a PayPal account.
Ninth, set Require Customer’s Billing Address if you find it necessary and vice versa.
Finally, set Billing Agreement Signup to Auto/ Ask Customer/ Never to determine whether the user can sign a billing agreement with your store in PayPal when there is no active billing agreement available in the customer account.
Save all config to complete.
- Step 6: Finish with the Smart Button Settings
You can customize the PayPal smart button’s size, color, shape, as well as decide where to show it – on the product pages, shopping cart pages, mini cart pages, or checkout page.
We have shown you how to set up PayPal Express Checkout in Magento 2. If you have any problems when following this tutorial, be free to ask us by leaving a comment below. Or, in urgent cases, you should contact PayPal team directly (via messages or calls) to assist with your problems. PayPal supports us on both online payment issues and to sign up for its services.
See you in the next tutorials!