Mastercard Payment Gateway Services (MPGS) - Magento 2
Screenshots
Overview
Mastercard Payment Gateway Services (MPGS) - Magento 2 extension adds a payment method to the Magento 2 checkout enabling credit and debit card payments to be accepted securely and to minimize PCI exposure. Merchants will need a Mastercard Payment Gateway Services account.
Also, the extension is compatible with other payment gateways:
- Adcb Payment Gateway
- Areeba Payment Gateway
- Axis Bank Payment Gateway
- Bank Alfalah Payment Gateway
- Bank Audi Payment Gateway
- Abu Dhabi Islamic Bank Payment Gateway
- Bank Of Beirut Payments
- Banque Libano-Française
- Bendigo Bank Payment Gateway
- Burgan Bank Kuwait
- Commercial Bank of Ceylon PLC
- Commercial Bank Of Kuwait
- CrediMax Payment Gateway
- HSBC Bank Payment Gateway
- Kuwait Finance House
- Global Payments MPGS
- Mashreq Bank payment Gateway
- Mauritius Commercial Bank (MCB)
- MCB eGate (Pakistan)
- National Bank Of Egypt (NBE)
- National Bank of Oman Payment Gateway (NBO)
- Network Online Payment Gateway
- NBK Payment Gateway (National Bank of Kuwait)
- Suncorp Gateway
- Banque Saudi Fransi (البنك السعودي الفرنسي)
- Doha Bank Payment Gateway
- etc
Payment options:
Mastercard Payment Gateway Services (Direct Payment): It allows your customer to purchase directly from your site using Credit Cards
Mastercard Payment Gateway Services (Hosted Checkout): Redirect to the Gateway website for credit card entry, then redirect back to your confirmation page once successful.
Features of Mastercard Payment Gateway Services (MPGS) - Magento 2
- Support all the banks in the world based on MPGS (MasterCard Payment Gateway Services)
- Support 3D-Secure V1, 3D-Secure V2 (EMV 3D Secure) (apply to Hosted Checkout)
- Support Credit/Debit Cards
- Secure Checkout Process
- Encrypted the payment credentials
- Capture New Sales
- Authorize and Capture
- Refund Online
- Create Invoice Automatically
- Webhook Notifications
- Support SSL Certificate
- Support multiple websites
- Support multiple store views
- Support multiple currencies
- Unlimited domains
Webhook Notifications
In case transaction response failed to come back for this transaction. This can happen due to an interruption in customers browsing session. Your checkout redirects customers to eGate and awaits the response to come back at the end. The response comes back through the customers browser with the redirection back to your success/error page. It majority of cases this works well. However if your customer closes the browser rather than waiting for the redirect, or if their lose connection, or their browser does not retain the response, etc. Your checkout does not receive the response and does not update with the outcome of the transaction.

Webhook Notifications will be used. It works by checking the transaction with MPGS merchant's Portal if there is no response after a certain about of time (i.e 15 minutes). If the transaction is not found by WebHook Notifications, it means the customer did not submit their payment after the redirect. But if it was submitted, your website will learn the approval/declined transaction.
3D-Secure V2 (3DS2) Authentication Flows
1. A payer browses your shop site, selects one or more products, proceeds to the payment page, and selects to pay with a card that supports 3DS1 and 3DS2.
2. Initiate Authentication: You ask the gateway to check with the card scheme if the card is enrolled for 3DS.
3. If 3DS authentication of the payer is available, the gateway returns the authentication details in the response.
4. The gateway returns details of the supported ACS call. You must submit the ACS call details as a form post in a hidden iframe, so that the ACS can collect additional data.
5. Authenticate Payer: You ask the gateway to perform the initiated authentication.
6. The gateway provides you with details of the authentication for a challenge flow (where the payer is required to respond to a challenge presented by the issuer). If the issuer requires the payer to respond to a challenge, you redirect the payer’s web browser to the ACS, which presents its authentication UI. The issuer returns the authentication result to the gateway. The gateway redirects the payer directly to your website.
7. Use the 3DS Authentication Transaction ID in a Payment Operation: You submit the payment for processing.
8. You display the order confirmation page to the payer.
Installation
Follow the steps below to install the Mastercard Payment Gateway Services (MPGS) extension on your Magento 2 store.
1. Extract the extension files into the following directory:
app/code/PL/Mpgs/
2. Open a terminal and navigate to your Magento root directory, then run the following commands:
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
After completing these steps, the extension will be available in the Magento Admin Panel for configuration.
How to configure the payment module using Mastercard Payment Gateway Services (MPGS)
Test Environment
If you would like to see how the Mastercard Payment Gateway Services (MPGS) works with Magento 2, please contact our team to request a demo or access the test environment.
Email: sales@polacin.com
The following test credit card numbers can be used in the test environment for development and testing purposes only.
Standard Test Data – All Supported Regions
Mastercard: 5123450000000008 Expiry Date: 01 / 39 3-D Secure Enrolled: Y
Mastercard: 2223000000000007 Expiry Date: 01 / 39 Secure Enrolled: Y
Mastercard: 5111111111111118 Expiry Date: 01 / 39 Secure Enrolled: N
Mastercard: 2223000000000023 Expiry Date: 01 / 39 Secure Enrolled: N
Visa: 4508750015741019 Expiry Date: 01 / 39 3-D Secure Enrolled: Y
Visa: 4012000033330026 Expiry Date: 01 / 39 3-D Secure Enrolled: N
Release Notes
Version 3.1.1 – June 30, 2026
- Clean code and translate the text
Version 3.1.0 – June 6, 2026
- Compatible with API Version 100 or later.
- Upgraded Hosted Checkout to Magento 2 Gateway Framework and Service Contracts for a next-gen, headless-ready architecture.
- Implemented advanced dynamic transaction tracking to effortlessly capture precise transaction IDs across complex 3DS2 multi-authentication layers.
- Introduced automated deep-lifecycle management to instantly void pending invoices, trigger native order cancellations, and auto-restore stock on successful voids.
- Engineered an optimized data-saving pipeline to eliminate duplicate order history logging and prevent data collision.
- Performance boost: Completely eliminated transactional lag, ensuring an ultra-smooth checkout and backend administration experience.
Version 2.3.3 – August 3, 2025
- Compatible with API version 100 (latest)
Version 2.3.2 – October 2, 2024
- Fixed prefix order issue
- Added Test Mode option
- Compatible with API version 84 or later
Version 2.3.1 – August 31, 2024
- Fixed payment gateway URL issue
Version 2.3.0 – June 3, 2024
- Compatible with API version 80 or later
- Added customer details (firstname, lastname, email, phone) to payment request for EMV 3D Secure requirements
Version 2.2.4 – January 3, 2024
- Fixed maximum character limits for address fields
- Fixed issues with valid Arabic characters in the address fields being submitted
Version 2.2.3 – October 12, 2023
- Added CSP whitelist
- Compatible with API version 75
Version 2.2.2 – May 25, 2023
- Added price format for Omani Rial (OMR) and National Bank of Oman Payment Gateway
- Show error code and error description if payment credentials are incorrect
Version 2.2.1 – February 8, 2023
- Updated API version to 69
Version 2.2.0 – January 10, 2023
- Added Webhook notifications for better transaction tracking
Version 2.1.1 – August 12, 2022
- Compatible with API version 63 or later
Version 2.1.0 – July 12, 2022
- Added notification when a new version is available
- Show error message if payment configuration is incorrect
- General stability improvements
Version 2.0.8 – September 9, 2021
- Added parameters for Direct Payment integration
Version 2.0.7 – May 29, 2021
- Added Authorize and Refund Online for both Direct Payment and Hosted Checkout
- Stability improvements
Version 2.0.6 – November 12, 2020
- Compatible with API version 56 or later
Version 2.0.5 – April 17, 2020
- Stability improvements
- Fixed bugs for Hosted Checkout with Magento 2.3.4
Version 2.0.4 – April 19, 2019
- Stability improvements
- Encrypted API Password for better security
Version 2.0.3 – February 20, 2019
- Fixed Offline Refund issue for Hosted Checkout Payment
Version 2.0.2 – October 22, 2018
- Bug fixes and stability improvements
- Added order.reference
- Fixed Total Due issue
Version 2.0.1 – March 20, 2017
- Stable version release
FAQs
Our client is from Kuwait, so he wants surety that this will work for Kuwait and Kuwait currency as well. Is your extension compatible with the NBK payment gateway?
Is MPGS extension compatible with the Taiwanese MasterCard API endpoint?
I want to implement the Bank Alfalah payment method and just want to confirm is it safe and is it easily configurable based on the Bank Alfalah provided credentials like merchant id, operator id, password, endpoint?
Does this extension support Magento 2 REST API?
- Generating the MPGS Session ID (for Hosted Checkout integrations on mobile apps or PWA frontends).
- Handling asynchronous Webhooks (Merchant Notifications) to ensure real-time order status updates.
Customer Reviews
-
Magento Store Owner
We integrated the MPGS module into our Magento 2 store to handle Mastercard payments, and it has been an excellent experience. The setup was smooth, and payments are processed reliably and quickly. Our customers appreciate the secure checkout and familiar Mastercard interface. This module is a must-have for any store targeting global customers with Mastercard paymentsReview by James Turner (Posted on 3/11/2026) -
Worked with Polacin since 2019 in my…
Worked with Polacin since 2019 in my magento store where I have an MPGS gateway.
They helped me in the setup and troubleshooting to get started.
Also great with upgrades to latest API as per bank requirements when I need it.
I am confident in their expertise and recommend them.Review by Yasser (Posted on 6/27/2024) -
Excellent Plugin
Perfection at its best. Working smooth with Mashreq Bank DubaiReview by Ali Basheer (Posted on 11/4/2023) -
Good MPGS integration
Good job for the MPGS payment integration with Magento 2. It ensures secure payments in my website, the 3D secure also worksReview by Wazir Abadi (Posted on 9/25/2023) -
Great plugin and support
No problems so far, charges credit cards via the payment gateway.
Support is responsive and helps without issuesReview by Sarath Kumar (Posted on 8/29/2023) -
Incredibly helpful
Polacin MPGS extension works seamlessly on my website, providing customers with a hassle-free purchasing experience. It's been incredibly helpful.Review by Danny Wallace (Posted on 8/25/2023) -
Great overall experience
I'm using this plugin for our store since from 2018 and so far i don't face any issues. I highly recommend this plugin to anyone who is looking to allow payment via master/visa cards.Review by Hassan (Posted on 4/6/2023) -
5 Star extension
Thank you for updating this payment extension. No issues so far after 2 months in use, i have enabled payer authentication and it's working wellReview by Muhammad Morris (Posted on 10/21/2022) -
Customer support is fantastic
Customer support is fantastic! I had some questions about getting it set up correctly and they provided fantastic, quick replies to each one of my questions! Also, the extension functioned exactly how I needed it to. Highly recommended!!Review by Bob Rogers (Posted on 10/13/2022) -
Worth purchasing it
Thanks the team for installing this module and helping me to configure the payment credentials. It's working perfectly for my website as well as 3DS2. Highly recommended!Review by Alaa Alam (Posted on 9/13/2022)