Configure the Magento 2 plugin for OnlinePay
Overview
When you have finished downloading and installing the Magento 2 plugin for OnlinePay in your Magento store, you need to configure the plugin with your OnlinePay credentials. This guide provides instructions for automatic and manual configuration.
Automatic setup
- In your Magento admin panel, navigate to Stores > Configuration.
- In the left navigation pane, expand Sales, then select Payment Methods.
- In the Payment methods section, select the Verifone - Credit Card Hosted Payment module.
- The Auto Setup Tool wizard opens automatically you have not configured your OnlinePay settings before. If you have configured your settings in the past, you can make changes to them in the same wizard.
- In the Auto Setup Tool wizard, select
Yes
orNo
next to Test mode to enable or disable test mode. If you are using a sandbox account, selectYes
. - Provide your OnlinePay
User Id
andAPI Key
in the respective fields. You can find out more about where to obtain these credentials in Get started with the OnlinePay API. - Press Continue, then wait for a success or error message to appear.
If a success message appears, the configuration is complete. We recommend that you check all tabs to verify the expected payment methods and settings are enabled, then click Update settings to verify.
If you see an error message, your account may not be configurable automatically. In this case, you can configure the plugin manually by following the instructions in the next section.
Manual setup
To configure the plugin manually, follow these steps:
- In your Magento admin panel, navigate to Stores > Configuration.
- In the left navigation pane, expand Sales, then select Payment Methods.
- In the Payment methods section, select the Verifone - Credit Card Hosted Payment module.
- In the Verifone account settings section, provide your OnlinePay credentials:
- Test Mode: select
Yes
orNo
next to Test mode to enable or disable test mode. If you are using a sandbox account, selectYes
. - Transaction Type: are automatically configured with
Sale
. The means that authorisation and capture occur immediately when the customer places an order. The other options areAuth
andPre-auth
.- Pre-auth - Authorisation and capture. Capture must be performed manually in the OnlinePay dashboard.
- Auth - Authorisation only. This is not supported for OnlinePay.
- API User: Your OnlinePay User ID.
- API Key: Your OnlinePay API Key.
- Entity ID: Your OnlinePay Organisation ID/Site ID.
- Region: Select AU (Australia) from the drop-down list.
- Test Mode: select
- In the Display settings section, provide the below details:
- Payment type: Hosted Payment Page / iFrame
- Title: Title of the store
- Description: Description of the store
- Theme ID: You can add a theme to use for the checkout page. This is a custom theme that you have created in the OnlinePay dashboard. See Customise your Checkout for more information.
- In the Card Payment settings section, provide your OnlinePay credentials:
- Enable card payment: Select
Yes
to accept card payments - Payment Contract ID: Your OnlinePay Payment Provider Contract ID.
- 3DS: Select
Yes
and provide your 3DS Contract ID. 3D Secure is a security protocol that provides an additional layer of security for online credit and debit card transactions. We require merchants to use 3D Secure for card payments. Failing to enable 3D Secure will result in you being liable for any chargebacks. See 3D Secure for more information.
- Enable card payment: Select
- In the Alternate payment options section, you can add details of the wallets:
- Google Pay
- Google Pay enabled: Select
Yes
to accept payments via Google Pay - Google Pay Contract ID - Provide your OnlinePay Payment Provider Contract ID.
- SCA Compliance Type - Set the SCA Compliance type to
Wallet
.Wallet
transactions enforce 3D Secure on transactions that are not a tokenised card. You can enforce 3D Secure on all transactions via Google Pay by selectingForce SCA
. Alternatively, you can disable 3D Secure by selectingNone
. Disabling 3D Secure authentication may increase the risk of fraud and chargebacks. - Google Pay 3DS Contract Id - Provide your Google Pay Contract ID
- Google Pay enabled: Select
- Apple Pay
- Apple Pay enabled: Select
Yes
to accept payments via Google Pay - Apple Pay Contract ID - Provide your OnlinePay Payment Provider Contract ID.
- SCA Compliance Type - None. 3D Secure is not applicable for Apple Pay transactions.
- Apple Pay enabled: Select
- Google Pay
- Click Save Config to apply the settings.
- Open the command line at the root of your Magento installation and run the following commands to clear the cache and re-index the data:
php bin/magento indexer:reindex php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f php bin/magento cache:flush
- Perform a test transaction to verify that the plugin is working correctly.
Troubleshooting
Checkout errors may occur, particularly when using localhost. If you encounter an error, make the following changes:
- Open the
app/code/Verifone/Hosted/Helper/Verifone.php
file in your preferred editor. - Find
$checkout = $this->getCheckoutParams($quote, $paymentMethod, $currency, $customerId, $locale);
. - Add the following commands under that line:
$checkout['return_url'] = str_replace("http:", "https:", $checkout['return_url']);
$checkout['shop_url'] = str_replace("http:", "https:", $checkout['shop_url']);
- Save and close.
- Retry the Checkout process.
- Perform the transaction and remove the
s
fromhttps:
in thereturn_url
after the transaction is processed to view the page.
Updated 10 days ago