Magento 2 PayPal Integration
To integrate PayPal into Magento 2 you need to choose one of the plans and subscribe for it. There are three basic plans for Magento merchants from PayPal:
- PayPal Payments Advanced;
- PayPal Payments Pro;
- PayPal Payments Standard.
Despite the ordinary packages, PayPal PLUS solution offers the usage of not only PayPal Wallet, but also credit cards, direct debit and an account purchase, which is available for all website customers, regardless of whether they have an account or not. The module is available for merchants from Germany and Latin America.
You can see the list of All-In-One Payment Solutions with all available PayPal plans. For this, go to the Admin Panel> Stores> Configuration> Sales> Payment Methods:
Then navigate to Recommended Solutions> Other PayPal Solutions:
Having acquired one of the PayPal business accounts, you should work in Magento 2 backend.
Magento 2 PayPal Integration
- Go to the Admin Panel> Store> Settings> Configuration> Sales> Payment Methods;
- Set up a right merchant's location here ( a country where your store is placed):
- Then expand the ‘PayPal All-In-One Payment Solution’, choose a plan you run and click on the ‘Configure’button near it. See the example with PayPal Payments Pro plan:
- You will see all the required PayPal settings here:
Required PayPal Settings
- The bars should be filled in with all the relevant information like ‘Email Associatedwith PayPal Merchant Account (Optional)’, ‘Partner’, ‘User’, ‘Vendor’, ‘Password’:
- If you need to test how it works before enabling it, set the ‘Test Mode’ to ‘Yes’ firstly:
Having checked everything works correctly, change it to ‘No’.
- Set the ‘Use Proxy’ option to ‘Yes’ if you run it for connecting with PayPal server. Then you’ll need to configure your IP address for the Proxy Host and port number for the Proxy Port;
Magento 2 PayPal Payments Pro: Basic Settings - PayPal Payments Pro
- Type in ‘Credit’ or ‘Debit’card into the ‘Title’section here. The ‘Sort Order’ section allows you to set the order of this payment method when buyers go to the checkout page;
- Choose either ‘Authorization’ or ‘Sale’ ‘Payment Action’ to confirm it through the backend or complete it automatically by transferring money from customers directly to your account;
- ‘Payment Applicable Form’ allows for choosing either:
- ‘All Allowed Countries’, which means you accept payments from all previously configured countries;
- ‘Specific Countries’: in this case you need to specify countries from which you are eager to accept payments;
- ‘Debug Mode’ should be set to ‘Yes’ if you need to gather the payments data into the log file (payments_payflow_advanced.log);
- Activate the ‘Enable SSL verification’ if you need to launch host authenticity verification;
- ‘Require CVV Entry’ should be set to ‘Yes’ in case you want to ask your customers to type in the three-digit code;
There are three more options that are editable in PayPal plans:
- ‘CVV Entry is Editable’, ‘Send Email Confirmation’, ‘URL method for Cancel URL and Return URL’ using which you can make the payment method even more tooled for your needs;
Magento 2 PayPal Express Checkout: Basic Settings - PayPal Express Checkout
PayPal Express Checkout is automatically enabled with PayPal Payments Pro package, which gives you a possibility to tap into more than 110 million active PayPal users. Thus you can give your clients a possibility to pay from the secure personal account with the redirect to the secure PayPal site to complete the order information.
Besides, for customers with a current PayPal account, there is an option to complete a purchase having clicked the ‘Check out with PayPal’ button.
- Enter the ‘PayPal’ ‘Title’ for each store view, enter the number of Express Checkout in the ‘Sort Order’ section, set the ‘Payment Action’ you need (see above);
- Set the ‘Display on Product Details Page’ to ‘Yes’ if you want to show the ‘Check out with PayPal’button on product pages.
- ‘Display on Shopping Cart’: set it to ‘Yes’ to make the option available from both the shopping cart and mini cart;
- ‘Payment Applicable Form’: choose one of the options either ‘All Allowed Countries’ or ‘Specific Countries’ in compliance with your needs (see similar settings in the Advanced Settings of the Basic Settings - PayPal Payments Pro);
‘Debug Mode’: to gather payment data into the log file set the option to ‘Yes’ (!credit card information is not saved here in line with PCI Data Security Standards!);
- ‘Enable SSL verification’: to enable host verification set the option to ‘Yes’;
‘Transfer Cart Line Items’: set the option to ‘Yes’ if you want to show a full summary of customer’s order from the PayPal site;
- ‘Skip Order Review Step’: set it to ‘Yes’to give customers a possibility to finish the transaction without returning to your website.
After all the required settings are fulfilled don't forget to click the ‘Save’ button.
In case you want to boost your Magento built-in possibilities, you can implement the Shipping & Payment By Customer Groups for Magento 2 extension. It allows for hiding or granting payment/shipping methods by different customer groups in line with your business needs.