Tutorial: How to Add New Payment Gateways in Magento 2
Introduce higher payment flexibility with new Magento payment gateways
First released to the public in 2018, Magento has become one of the most extensively used ecommerce platforms. Approximately 240,000 websites run on a Magento edition today. Many e-merchants switch to Magento 2, as developers made multiple improvements compared to Magento 1: a new admin panel interface, streamlined checkout, performance enhancements, etc.
Being extremely flexible, Magento is compatible with many payment gateways that enable online payment processing. Some renowned payment integrations are available out-of-the-box. But smart e-retailers introduce alternative payment gateways since shoppers expect multiple online payment options.
In this article, we’ll discuss how Magento 2 admin users can set up out-of-the-box and alternative Magento payment gateways.
Recommended Payment Gateways
To configure Magento 2 payment options, navigate to Stores > Configuration > Sales Payment Methods in the admin panel. Select the country where your business is located in the ‘Merchant Location’ section. Now you can start off with configuring payment methods.
By default, Magento recommends using PayPal and Braintree. PayPal is an undoubted leader in online payments. There are more than 203 million PayPal accounts across 202 countries. This payment gateway supports 25 currencies. Braintree is another market leader enabling payments in over 130 currencies across more than 40 countries.
Please note that if there are multiple websites, stores or views in your Magento installation, you can choose the Store view in the upper-left corner to apply the payment configuration. We’ll take a closer look at setting up PayPal payments to show you how to activate recommended payment options.
You should create one more user in your PayPal merchant account before activating PayPal payments at the Magento store. Then proceed to Required PayPal settings on the Payment Methods page in the Magento admin panel to configure this payment gateway.
Take the following steps:
- In the first field, enter the email address specified in your PayPal merchant account.
- Add the required details to API Username, API Password, and API Signature fields or click the ‘Get Credentials from PayPal’ button.
- If you’re going to use credentials from the sandbox account, tap the ‘Sandbox Credentials’ button and the instructions will tell you what to do.
- Set ‘API Uses Proxy’ to ‘Yes’ if your system uses a proxy. Then add the info to ‘Proxy Host’ and ‘Proxy Port’ fields.
- Enable PayPal payments by selecting ‘Yes’ in the ‘Enable this Solution’ field.
- Make changes in ‘Enable In-Context Checkout Experience’ and ‘Enable PayPal Credit’ fields too if necessary.
‘Advertise PayPal Credit’ is the optional section. Configure it to promote financing options. In this section, you can place PayPal banners on Home, Category, Catalog Product, and Checkout Cart pages.
In the ‘Basic Settings’ section, specify a title of the payment method your customers will be shown at checkout. Enter a numeric value into the ‘Sort Order’ field to determine the position of PayPal in the list of other payment methods at checkout. Select the appropriate action in the ‘Payment Action’ field. When the ‘order’ action is enabled, you’ll have three more related fields to complete.
If you want to display the ‘Check out with PayPal’ button on product pages, set the last field to ‘Yes’.
In the ‘Advanced Settings’ section, you can either enable or disable displaying PayPal in the shopping cart. You can enable this payment method only in specific countries or in all allowed countries. To write communications with the PayPal system into a log file, set the ‘Debug Mode’ field to ‘Yes’. Enable SSL verification if necessary.
Select ‘Yes’ in the ‘Transfer Shipping Options’ field to get a complete summary of your orders by line item from the official PayPal website. The ‘Transfer Shipping Options’ field enables up to ten shipping options in the summary.
Use the ‘Shortcut Buttons Flavor’ to manage types of images that will be used for the PayPal acceptance button. Leverage the guest checkout functionality to indulge your customers.
Navigate to the ‘Require Customer’s Billing Address’ field to set options for requesting customers’ billing addresses. The ‘Billing Agreement Signup’ field allows you to determine when customers should sign a billing agreement.
To deliver an outstanding shopping experience, you can grant buyers a chance to complete the transaction later on by going to the PayPal website. Set ‘Skip Order Review Step’ to ‘Yes’ to enable this functionality at your store.
Access the ‘PayPal Billing Agreement Settings’ section to configure the PayPal Billing Agreement functionality in your Magento installation. You can add a custom agreement title, manage its sort order on the front-end, enable SSL-verification, and much more.
In the first two fields of the ‘Settlement Report’ section, enter SFTP login credentials if you’ve signed up for Secure FTP Server of PayPal. You can use the Sandbox mode to run test reports. Add the required info in other fields, too. To benefit from automatic fetching, enable it in the settings and configure the schedule.
Expand the ‘Frontend Experience Settings’ section to customize the look of PayPal merchant pages and determine where PayPal logos will be displayed. When you are done, click the ‘Save Config’ button at the top of the page. Now your customers can use PayPal to make payments!
Other Payment Methods
There are four other payment methods available in Magento 2 out-of-the-box. You can find them by expanding the ‘Other Payment Methods’ section. All the methods can be configured in a way much similar to the one of PayPal.
Authorize.Net is responsible for all the steps in the transaction process: data submission, payment data collection, and so on. This payment can be used with both orders coming from the stores and orders created from Admin.
One of the pioneers in online payment services, CyberSource is now a payment solution used by more than 400,000 businesses worldwide. Magento merchants are keen users of this payment gateway, too.
Based in Australia, eWay holds a 25% share of the local online market. It is also available in 7 other countries: the UK, Malaysia, New Zealand, and others. It’s a perfect choice for the Magento store that targets Australian shoppers.
Today Worldpay serves 400,000 merchants across 146 countries. It accepts payments in 126 currencies. Sounds impressive, doesn’t it? Here is one great feature that you will certainly like: you can manage fraud prevention settings of this gateway right from the admin panel.
Alternative Payment Gateways
To be ahead of the pack, you can introduce alternative payment gateways. Installing a Magento extension released by the payment platform or Magento developers is the best way to do that. You can find some models in the Magento marketplace.
We’ve compiled a list of alternative payment methods that are popular right now:
- Amazon Pay
Skrill is another great option. It has been providing payment services since 2001. You can download a free Magento extension from the marketplace.
2Checkout is the frequent choice for people all over the world. This payment gateway supports transactions in more than 200 markets and it works with 87 currencies.
If your customers are in Europe, you can offer them Sage Pay payments. It is recognized as one of the most trusted payment companies in the region. Sage Pay has its own Magento extension, as well.
PayFast is now gaining traction in the South African online space. So it’s a wise idea to enable this gateway for shoppers from this country.
Bitcoin and altcoins have become buzzwords a couple of years ago. Allow you Magento customers to exploit the potential of such payments by enabling gateways that support these currencies at your e-store.
Try these extensions first:
Enabling multiple payment options can help your Magento store gain a competitive advantage by giving shoppers a free choice of what payment gates to use. Leverage both out-of-the-box and alternative Magento payment gateways to make your store stand out in the crowd.
Aitoc is a young team of passionate professionals delivering robust Magento 2 extensions. Founded in 2001, Aitoc has produced over 100 modules for clients worldwide. The company continuously evolves, now offering a full range of custom ecommerce development services.