Home > PrestaShop – Mastercard Payment Gateway Services > Configuration > Hosted Checkout Configuration

PrestaShop – Mastercard Payment Gateway Services

Created date: 06-04-23   |   Updated date: 26-11-24   |   Plugin version: 1.4.3  |   API version: 84

Hosted Checkout Configuration

The Hosted Checkout Configuration consists of 3 sections:

General Settings, Payment Method Settings – Hosted Checkout and Advanced Parameters.

Please find a brief description of the fields in this configuration page:

 

  • Live Mode: Toggle this button to ‘Enabled’ to configure your merchant credentials to Live mode. Toggle this button to ‘Disabled’ if you want to switch to Test mode. In Test mode, you can check if the payment transactions are working correctly. It is possible to add credentials for the test and live mode simultaneously. Both modes have their credential fields, which you need to fill separately. It allows you to switch between modes without re-entering your credentials every time.
  • API Endpoint: Choose the API endpoint based on your account region.
  • Custom API Endpoint: Enter the Custom API Endpoint. This field will be displayed if you have selected the API Endpoint as Others.
  • Send Line Items: Toggle this option to ‘Disabled’ if you do not want to send the additional data to the Mastercard Gateway.

  • Test Merchant ID: Enter your test merchant ID.

  • Test API password: Enter the API password from your merchant account.

  • Test Webhook Secret: Enter your test webhook secret from your merchant account.

  • Click on the Save button to save the changes made in the ‘General Settings’ section.

  • If you’ve set the ‘Live Mode’ to Disabled, ‘Test Merchant ID’, ‘Test API Password’, and ‘Test Webhook Secret’ fields will be displayed.

  • Conversely, if you’ve set the ‘Live Mode’ to Enabled, the ‘Merchant ID’, ‘API Password’, and ‘Webhook Secret’ fields will be displayed.

  • It is important to configure your gateway credentials in TEST mode initially and verify that everything functions properly.

  • Failure to configure the gateway credentials correctly will prevent enabling any of the module’s payment methods.

  • If, for any reason, the gateway credentials are incorrect, a warning will appear at the top of the ‘Configuration’ page.

  • Enabled: Toggle this button as ‘Enabled’ to enable the Hosted Checkout configuration.
  • Title: Enter the text that needs to be displayed in the front-end checkout page/payment method section.
  • Theme: You can apply the effects of the theme on the Mastercard Payment Gateway pop-up.
  • Payment Model: There are two Payment Models (payment flow methods): Purchase and Authorize.
  • Purchase
    When you choose ‘Payment Model’ as Purchase, transactions will occur automatically. Once users enter their card details and submit an order, the total order amount will be deducted from their card. Subsequently, it will be automatically transferred to the merchant’s account. Although there may be a delay in reflecting the amount in the merchant’s account, the process is entirely automated.
  • Authorize
    If you select ‘Payment Model’ as Authorize, the merchant should manually process the transactions and accept the payment amount. Capturing funds manually can be done via PrestaShop Admin interface as well as Merchant’s Mastercard Payment Gateway account login.
  • Checkout Interaction Model: For the Checkout Interaction, you have the option to select either “Embedded” or “Redirect to Payment Page” from the dropdown menu.
  • The “Embedded” option allows you to enter the user’s card details directly in the Payment Options section.

  • Choosing “Redirect to Payment Page” will direct you to another page where you can enter the user’s payment details.

Embedded
Redirect to payment page
  • Click on the Save button to save the changes made in the ‘Payment Method Settings – Hosted Checkout’ section.
  • Logging Verbosity: Allows to set the verbosity level of var/logs/mastercard.log.

You can select either:

  • Everything: This option logs everything related to the error when it occurs (Like: API Response/status, errors, warning, etc.).

  • Errors and Warning Only: This option logs only errors and warning messages when the error occurs.

  • Errors Only: This is the default option, which only logs errors.

  • Disabled: Nothing will be logged when an error occurs.

  • Gateway Order ID Prefix: In case one Merchant ID is used by multiple installations, then the ‘Gateway Order ID Prefix’ can be used to add a prefix to order IDs so that they will not conflict in the gateway. The default state is blank.
  • Custom Webhook Endpoint: This is mostly used by development or with some complex web server rules, where the URL is not automatically detected correctly.

It is suggested to keep all these fields with the assigned default value. If required, then do required configuration changes based on your needs but first consult your Technical team / Mastercard Payment Gateway Module support for these.

  • Click on the Save button to save the changes made in the ‘Advanced Parameters’ section.