Using the 2Checkout Payment Gateway App

The 2Checkout Payment Gateway app creates an iframe checkout option which displays a secure payment form inside your website. You are able to receive transactions from 196 countries through 87 currencies.

2Checkout is a payment gateway provider (much like PayPal) who will process your website's transactions and send the money to your bank account. Customers can pay at checkout using their credit/debit cards without leaving your site.

You will need an active and verified 2Checkout account to use this gateway, and an SSL certificate is also required.

2checkout_gateway_ao

Setup & Usage

2Checkout Setup

You must have a 2Checkout account to get an Account Number and set both the Return URL and Notification URL.

Go to 2Checkout and log in.

In the 2Checkout Seller Area, find your "Account Number" at the top right of the screen under your username.

2checkout-account-number
  1. Go to "Account > Site Management".
  2. Set the "Direct Return" as "Header Redirect (Your URL)".
  3. Enter the "Approved URL" as https://yoursite.com/?wc-api=WC_2Checkout_Inline_Checkout_Gateway
  4. Enter a strong "Secret Word".
2checkout-site-management-settings

To set up the "Notification URL", head to "Webhooks".

Enable the "Order Created", "Fraud Status Changed", "Invoice Status Changed", and "Refund Issued" options and set the URLs, eg. https://yoursite.com/?wc-api=WC_2Checkout_Inline_Checkout_Gateway

2checkout-webhooks-settings

App Settings

Once you've enabled the 2Checkout Payment Gateway app in your admin panel, head to "Settings > Store Settings > Checkout > 2Checkout".

2checkout-settings

Enter your 2Checkout "Account Number" and "Secret Word" to complete the integration.

You can also customise the Title, Description, and Invoice Prefix for the gateway.

Once you've completed the setup and enabled the gateway, it will appear on your front-end checkout process like this.

2checkout-front-end-1
2checkout-front-end-2
2checkout-front-end-3