Skip to main content

Online payments

Magento 2 Plugin Integration

Last updated: 23-Dec-2022
Rate this article:


Magento is an open-source PHP-based eCommerce platform that offers a high degree of flexibility and control over the user experience, catalog, content, and functionality of their online store. You can integrate with Magento 2 web store via Hosted Checkout by following the steps in this guide.

Magento 2 plugin enables you to process orders with Verifone's Hosted Checkout.


Prior to installation, the following prerequisites must be met:

  • A Magento 2 Installation (Version 2.1x, 2.3.x or 2.4.x)
  • sftp/scp and shell access to your server
   To start accepting eCommerce transactions, you will need to generate a Secure Card Capture Key.

Magento 2 Configuration

Follow these steps to integrate the Magento 2 plugin:

  1. Download the latest release from the bottom of this page and extract the archive.
  2. Upload the included Verifone directory to 'app/code/' under your Magento root directory on your server.
  3. Upload the files to your server, to your instance of Magento 2. Each file must be uploaded to the correct directory.

Integrate Magento 2 Plugin for Verifone_1

  4. Install the module by running 'bin/magento setup:upgrade' and 'bin/magento setup:di:compile'.

  5. Log in to your Magento 2 administration panel and navigate to System → Cache management.  

Integrate Magento 2 Plugin for Verifone_2

  6. On the Cache management page, click on the Flush Magento cache button.

Integrate Magento 2 Plugin for Verifone_3

  7. Go back to the System tab and select Index Management.

Integrate Magento 2 Plugin for Verifone_4

  8. On the Index Management page, select the Update on save option and click on the Submit button to re-index all templates.

Integrate Magento 2 Plugin for Verifone_5

Card payment settings

Follow these steps to configure your card payment settings.

  1. In the Magento admin panel, go to Stores → Configuration.

Integrate Magento 2 Plugin for Verifone_6

  2.  Under Configuration, click on the Sales tab and scroll down to Payment methods.

Integrate Magento 2 Plugin for Verifone_7

  3. Under Payment methods, you will see the Verifone - Credit Card Hosted Payment module.

Integrate Magento 2 Plugin for Verifone_9

  4. Click on Verifone - Credit Card Hosted Payment and input your information that you can find in your Verifone Central account.

  • Enabled - Enables the payment method.
  • Test Mode - If you choose to enable the Test mode, you will need Test credentials for the test environment. Contact our support team for more details about test credentials and access to the test environment.
  • Invoice - Invoice the order automatically when successful.
  • New Order Status - Status for new orders (processing or complete should be selected).
  • Region - Region to target.
  • API User & API Key - You can find them in your Verifone Central account, under Profile → API Keys. Read here how to get the API Key.

Magento Verifone Account Settings

  • Entity ID - The Entity ID can be found in Verifone Central, under Administration  Organisations. The 'Organisation ID' listed is the Entity ID required for configuring the plugin.
  • Enable/Disable cURL verify host and peer - Enable host/SSL verification.

organisation entity ID

  • Payment Type - Hosted Payment Page.
  • Title - The customer-facing payment method label (Verifone Hosted Cart).
  • Description - The customer-facing description for your payment solution.
  • Theme ID: The layout and design of the payment page available to shoppers. To use this in conjunction with the Magento 2 plugin, you need to create a custom theme for your payment page, by using the tool available in your Verifone Central account. Once the customer theme is created, you will be able to pick up the theme ID and fill it in the Magento 2 display settings section. More on themes can be found here

Payment type Tile Description

  • Payment Contract ID - The payment contract can be found in the Verifone Central, under Administration  Payment Contract Providers. The 'Payment Provider Contract ID' listed is the Payment Contract ID required for the plugin configuration. 
  • 3DS - Enable 3DS for transactions.
  • Transaction type
    • Pre-auth Preauthorization acts as a reservation on your cardholder’s account. Once you are able to ship the products and decide to withdraw the amount, you can then capture the payment (either via your Verifone Central account or by using Magento2 → Orders  Capture). Preauthorization allows you more time to capture the payment (it is usually 30 days but this needs to be checked with acquirer, as it might vary depending on card schemes/ merchant category code). Please also make sure Verifone supports this transaction type for the acquiring solution you are using.  
    • Auth Authorization also acts as a reservation on your cardholder’s account – that you can capture later on, once you ship the products to your customers. The difference between authorization and preauthorization is that you only have up to 7 days allowed by the time you decide to capture the amount. Here as well, please check that Verifone supports this transaction type for the acquiring solution you are using. 
    • Sale - The sale transaction implies authorization and capture are done in one single step.

MAgenton VF Card Payment Settings

  5. Click on Enable Fraud Protection and select Yes from the drop-down list to activate the fraud protection process. Write your relevant fraud contract ID details in the Fraud Contract ID field box (To get your Fraud Contract ID information, log in to Verifone Central, go to the Administration tab and click on Added value services > Fraud protect).

Fraud Protect is a fraud assessing solution that provides information about the fraud risk of each eligible transaction. Merchants can use Fraud Protect for transactions processed through Verifone.​

Using Fraud Protect makes it easier to accept safe transactions and reject the fraudulent ones, which can increase sales and reduce costs associated with credit card fraud.​

Access the Fraud protection documentation to view the Fraud Protect-related information and how to set your fraud_protection_contract from Verifone Central.

Fraud Protection

  6. Click on Save Config to save your settings.

Integrate Magento 2 Plugin for Verifone_10

7. Expand the Alternative Payment Options to activate the following payment methods:

  • Paypal - Enable Paypal as a payment method by selecting Yes from the Paypal Enabled drop-down menu.
  • Apple Pay - Enable Apple Pay as a payment method by selecting Yes from the Apple pay Enabled drop-down menu.
  • Google Pay:
    • Enable Google Pay as a payment method by selecting Yes from the Google Pay Enabled drop-down menu.
  • MobilePay:
    • Enable MobilePay as a payment method by selecting Yes from the MobilePay Enabled drop-down menu.
    • SCA (Strong Customer Authentication) compliance level: Given that wallet payment providers already have Delegated Authentication rights to perform Strong Customer Authentication, we recommend setting this to “wallet”. 
    • MobilePay 3DS Contract ID/ Test MobilePay 3DS Contract ID: The 3DS Contract ID can be found in your Verifone Central account, under Administration → 3-D Secure Provider Contracts.

APMS Enabblement 1

  • Vipps.
    • Enable Vipps as a payment method by selecting Yes from the Vipps Enabled drop-down menu. 
    • Vipps 3DS Contract ID: The 3DS Contract ID can be found in your Verifone Central account, under Administration → 3-D Secure Provider Contracts.
  • Swish. Enable Swish as a payment method by selecting Yes from the Swish Enabled drop-down menu.
  • Klarna. Enable Klarna as a payment method by selecting Yes from the Klarna Enabled drop-down menu.
  • GPP2. Enable GPP2 as a payment method by selecting Yes from the GPP2 Enabled drop-down menu.

APMS Enabblement 2


Error handling and troubleshooting

If you encounter any errors during the installation and configuration of the Magento 2 plugin, you can find a log of all errors under Reports → Customer Engagement → Log Viewer.

Integrate Magento 2 Plugin for Verifone_12

It’s highly recommended to visit the help center for more in-depth troubleshooting.

All errors are logged in var/log and var/reports folder. If some errors are not logged, you can always view the Apache or Nginx logs.

Common errors

  • Not having the currency of Magento 2 set to the one that the payment contract supports
  • Not having created a public key for Secure Card Capture (see section Secure Card Capture Key above)
  • Entity ID, Payment Contract ID, or 3DS Contract ID do not match the correct entity for which they were created
  • The cURL verify host and peer option is enabled/disabled but the host server does not have proper TLS certificates
  • Not having the latest Magento 2 module version installed
  • Make sure that the credentials are correct: Payment Contract ID, User ID, Password, Realm, Entity ID, Client ID, etc.
  • If the website is down or the assets cannot be found on the server, go to the terminal on the server and run several Magento 2 deploy commands. Read more about Magento commands.

In most cases, the error may be caused by various PHP errors and/or warnings.

If the error is caused by a request to the Verifone server, then the error message received when the request fails is very informative. Here is an example:

    "code": 116,
    "details": {},
    "timestamp": 1608705038970,
    "message": "Access is restricted to authenticated users only. The query can't be made without a valid JWT (check the Authorization header of your request)."

The above request was denied because the user was not authorized. This is due to an invalid token being present in the Authorization bearer.

This kind of error format will be present on almost all requests that fail and will deliver a concrete error message along with it which in turn will pinpoint the problem precisely.

Download the Verifone Payment Module

Release date Build Release notes
  • Added support for creating orders before redirect
  • Added cron job to clean up pending orders
  • Fixed installation bugs


Rate this article:

Need help?

Do you have a question? On our Support page you will find a list with answers to frequently asked questions.
Did not find the answer you are looking for? Please contact us. We are happy to help.

Logo of Verifone