Home > OpenCart – Mastercard Gateway > Configuration > Hosted Checkout Configuration

OpenCart – Mastercard Gateway

Created date: 05-04-23   |   Updated date: 03-07-25   |   Plugin version: 1.3.3  |   API version: 100

Hosted Checkout Configuration

Below is a detailed explanation of each field, designed to guide you through the setup process:

Enabling the “Hosted Checkout”

Hosted Checkout:
Toggle this button to enable MasterCard Gateway to be used as your OpenCart payment method. This step activates the configuration needed for this payment option as well as enables the same in the checkout page.

Adding “Title”
Title” displayed in Checkout page

Title:
Type in a name or label for this payment method. This is what your customers will see on the checkout page when choosing how to pay. Make sure the label is clear and easy to understand.

Payment Action:
Choose one of the following payment flows:

Payment Action – Purchase

1. Purchase

 

  • If you choose the ‘Payment Action’ option as Purchase, the payment process will happen automatically. Here’s how it works:
    • When a user enters their card details and submits an order, the total amount of the order is immediately deducted from their card.
    • This amount is then automatically transferred to the merchant’s account.

Please note that while the transfer is automatic, it might take a little time for the amount to show up in the merchant’s account. However, no additional action is required from either the user or the merchant to complete the process.

Payment Action – Authorize

2. Authorize

  • If you choose “Payment Action” as Authorize, you will need to manually process the transaction to accept the payment. This means you must take an additional step to capture the payment amount.
  • The manual capture of funds is done through the Backend. Detailed instructions for this process can be found in the Online Capture for ‘Authorize’ Transactions section of this document.
  • The Authorize payment method works in two steps:
    • Authorization happens during checkout. This ensures the payment method is valid and reserves the funds.
    • Funds capture happens later. The money is only deducted after the merchant invoices the order.

This method gives you more control but requires you to complete the capture process manually within the stipulated timeframe configured for your MID.

Checkout Interaction:
For the Checkout Interaction, you have the option to select either “Redirect to Payment Page” or “Embedded Form” from the dropdown menu.

Checkout Interaction – Redirect to Payment Page
Redirected Payment Page

Redirect to Payment Page:
Customers are redirected to a secure Mastercard-hosted page to complete payment. Choosing “Redirect to Payment Page” will enable the Merchant Information section at the end of the plugin configuration page, allowing you to specify the information to be displayed on the redirected page.

Checkout Interaction – Embedded Form
Embedded Form

Embedded Form:
Customers enter card details directly on the checkout page.

Gateway API credentials

Test Mode:

  • Select Yes to use test credentials (API username prefixed with TEST).
  • Select No to switch to live production mode.
  • Recommendation: Always test in Test mode before switching to Live mode.

Gateway URL:

Enter the Gateway URL shared by your payment service provider. Enter the URL with https prefix. For example https://na.gateway.mastercard.com/

Merchant ID:

Enter your Merchant ID.

API Password:

Enter the API password obtained from your Mastercard Gateway account.

Test Merchant ID:

Enter your Test Merchant ID having TEST prefix.

TEST API Password:

Enter the API Password obtained from your Mastercard Gateway account.

Webhook Secret:

Enter the Webhook Secret from your Mastercard Gateway account. Please refer to API Configuration to obtain the Webhook Secret.

Test Webhook Secret:

Enter the Test Webhook Secret from your Mastercard Gateway account. Please refer to API Configuration to obtain the Webhook Secret.

If the ‘Test Mode’ option is set to “Yes”, the fields will be displayed as Test Merchant ID, Test API Password, and Test Webhook Secret.

 

Please set up your Merchant credentials in TEST mode and ensure that everything functions correctly.

Debug Logging, Order ID prefix, Send Line items

Debug logging:

Enable Debug logging by selecting Yes if you’re testing in Test Mode. Debugging creates detailed logs that can help you identify and fix issues with your payment process.

Order ID Prefix:

Specify the Order ID prefix. This is necessary if multiple integrations share the same Merchant ID to prevent potential duplicates in Order IDs, which could result in payment issues.

Send Line items:

Select Yes if you want to include detailed order information (like item names, quantities, and prices) in the transactions sent to the Mastercard Gateway. This helps with tracking and provides more details for reporting.

Status Options

Approved Status:

This setting determines how successfully placed orders are labeled in the OpenCart Platform after being processed.

Changing this setting won’t impact how transactions are processed by the payment gateway – it only updates how they are displayed in your system.

Declined Status:
This setting determines how unsuccessful/failed orders are labeled in the OpenCart Platform after being processed.

Changing this setting won’t impact how transactions are processed by the payment gateway – it only updates how they are displayed in your system.

Pending Status:
This setting determines how pending orders are labeled in the OpenCart Platform after being processed.

Changing this setting won’t impact how transactions are processed by the payment gateway – it only updates how they are displayed in your system.

Risk Review Required Status:
This setting determines how suspicious orders are labeled in the OpenCart Platform after being processed.

Changing this setting won’t impact how transactions are processed by the payment gateway – it only updates how they are displayed in your system.

Declined by Risk Assessment:
This setting determines how declined orders that were suspicious are labeled in the OpenCart Platform after being processed.

Changing this setting won’t impact how transactions are processed by the payment gateway – it only updates how they are displayed in your system.

Sort Order

Sort Order:
This controls the order in which this payment method appears to customers. A lower number means higher priority (e.g., 0 is the top priority).

Sort Order

Merchant Information:
This section is displayed only when “Redirect to Payment Page” is selected for Checkout Interaction. Toggle this button to activate the configuration needed for this section as well as display Merchant Information on the redirected payment page.

  • Merchant Name: Enter your business name (up to 40 characters) to be displayed to the payer during the payment interaction.
  • Address line 1: Enter the first line of your business address (up to 100 characters) to be displayed to the payer during the payment interaction.
  • Address line 2: Enter the second line of your business address (up to 100 characters) to be displayed to the payer during the payment interaction.
  • Postcode/ZIP: Enter the postal or ZIP code of your business address (up to 100 characters) to be displayed to the payer during the payment interaction.
  • Country/State: Enter the country or state of your business address (up to 100 characters) to be displayed to the payer during the payment interaction.
  • Email: Enter your business email address to be displayed to the payer during the payment interaction (e.g., a customer service email).
  • Phone: Enter your business phone number (up to 20 characters) to be displayed to the payer during the payment interaction.
  • Logo: Upload your business logo (JPEG, PNG, or SVG) to be displayed to the payer during the payment interaction.
    • The logo must be 140×140 pixels.
    • Logos exceeding 140 pixels will be automatically resized.
Merchant Information in Redirected Payment Page

Click the “Save” button to save the modifications made on the ‘Mastercard Gateway Configuration’ page.