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

  1. In your Magento admin panel, navigate to Stores > Configuration.
  2. In the left navigation pane, expand Sales, then select Payment Methods.
  3. In the Payment methods section, select the Verifone - Credit Card Hosted Payment module.
  4. 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.
  5. In the Auto Setup Tool wizard, select Yes or No next to Test mode to enable or disable test mode. If you are using a sandbox account, select Yes.
  6. Provide your OnlinePay User Id and API Key in the respective fields. You can find out more about where to obtain these credentials in Get started with the OnlinePay API.
  7. 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:

  1. In your Magento admin panel, navigate to Stores > Configuration.
  2. In the left navigation pane, expand Sales, then select Payment Methods.
  3. In the Payment methods section, select the Verifone - Credit Card Hosted Payment module.
  4. In the Verifone account settings section, provide your OnlinePay credentials:
    • Test Mode: select Yes or No next to Test mode to enable or disable test mode. If you are using a sandbox account, select Yes.
    • Transaction Type: are automatically configured with Sale. The means that authorisation and capture occur immediately when the customer places an order. The other options are Auth and Pre-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.
  5. 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.
  6. 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.
  7. 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 selecting Force SCA. Alternatively, you can disable 3D Secure by selecting None. Disabling 3D Secure authentication may increase the risk of fraud and chargebacks.
      • Google Pay 3DS Contract Id - Provide your Google Pay Contract ID
    • 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.
  8. Click Save Config to apply the settings.
  9. 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
    
  10. 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:

  1. Open the app/code/Verifone/Hosted/Helper/Verifone.php file in your preferred editor.
  2. Find $checkout = $this->getCheckoutParams($quote, $paymentMethod, $currency, $customerId, $locale);.
  3. 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']);
  1. Save and close.
  2. Retry the Checkout process.
  3. Perform the transaction and remove the s from https: in the return_url after the transaction is processed to view the page.


St. George BankSA Bank of Melbourne

This information is a general statement for information purposes only and should only be used as a guide. While all care has been taken in preparation of this document, no member of the Westpac Group, nor any of their employees or directors gives any warranty of accuracy or reliability nor accepts any liability in any other way, including by reason of negligence for any errors or omissions contained herein, to the extent permitted by law. Unless otherwise specified, the products and services described are available only in Australia.

© St.George, Bank of Melbourne and BankSA – Divisions of Westpac Banking Corporation ABN 33 007 457 141 AFSL and Australian credit licence 233714.