$ php bin/magento module:enable Improntus_MachPay --clear-static-content
$ php bin/magento setup:upgrade
$ rm -rf var/di var/view_preprocessed var/cache generated/*
$ php bin/magento setup:static-content:deployImprontus MachPay is a payment module for Magento2 that integrates the MachPay payment system into Magento's checkout process. It allows customers to easily perform payments using MachPay.
- Integration of MachPay as a payment method.
- Allows customers to pay using MachPay.
- Functionality for refunding orders.
- Functionality for cancelling MachPay orders on user's request.
- Supports translations, with a Spanish (Chile) translation already provided.
- Button for cancelling the payment in the checkout process.
- Cron job for cancelling orders that have not been paid after a certain amount of time.
- Cron job for cleaning old qr codes from the server.
- Magento 2.x (tested with 2.4)
- PHP 8.1 or above
Configure the MachPay API credentials in Stores -> Configuration -> Sales -> Payment Methods.
if it has MatchPay with automatic confirmation
- Verify that the configuration located in Store/Configuration/Sales/Payment Method/Mach is set to Yes
if it has MatchPay with manual confirmation
- Verify that the configuration located in Store/Configuration/Sales/Payment Method/Mach is set to No
- Upon placing an order, a QR code is displayed for MachPay payment.
- Orders enter the "payment_review" state.
- Through a cron job, MachPay is queried for the status of transactions in "payment_review."
- When MachPay confirms payment, the order transitions to "processing," and the corresponding invoice is created.
During the period between order creation and MachPay confirmation, it is possible to reverse payment from MachPay. MachPay notifies Magento through a webhook.
After order confirmation in the Magento panel, a button appears to create a refund if needed. This sends a request to MachPay to initiate the refund process. MachPay confirms the refund through a webhook.

