kostealupu/maibmagento

integration with Magento 2

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:magento2-module

2.0.0 2022-10-19 07:46 UTC

This package is auto-updated.

Last update: 2024-05-28 16:41:27 UTC


README

Introduction

The module integrates a Magento 2 based webstore with maib ecommerce.

Requirements

Magento 2 (Composer v.2)

Installation

bin/magento maintenance:enable
composer clear-cache
composer require kostealupu/maibmagento:*
bin/magento setup:upgrade
rm -rf var/di var/generation generated/code
bin/magento setup:di:compile
rm -rf pub/static/*
bin/magento setup:static-content:deploy en_US <additional locales, e.g.: ro_RO>
bin/magento maintenance:disable

Before usage

To initiate a payment transaction you will need get the access by IP and set the return callback URL of your site at bank side.

Send email to maib ecommerce support (ecom@maib.md) and indicate your site external IP address and callback URL (https://yoursite.com/dfe-tbc-bank/).

Configuration

Stores > Configuration > MAIB > Payment

Title

Title displayed on the checkout screen.

Certificate

Paste the contents of your certificate (in the .pem format). For test mode: "magento-0149583.pem" from this repository. For live mode request certificate from maib ecommerce support. You will receive a certificate for live mode in .pfx format.

Use openssl to convert certificate in .pem format from .pfx and password provided by bank:

openssl pkcs12 -in certificate.pfx -out certificate.pem -nodes

Password

For test mode: "Za86DuC$". For live mode request password from maib ecommerce support.

Payment Action

  • Capture (recomended) - Single Message System (SMS) Transaction. When the client's money transfers on the merchant account instantly when the user do the payment.

  • Authorize - Dual Message System (DMS) Transaction. When the client's money has been blocked on their account and later merchant can confirm that transaction (in order invoice) to money transfer on the merchant account.

Authorize is not compatible with Apple Pay and Google Pay!

Description

Transaction description displayed in the maib merchant interface.

{customer.name}	- Customer name
{order.id}	- Order increment ID
{order.items}	- Order items
{store.domain}	- Store domain name
{store.name}	- Store name
{store.url}	- Store URL
{current date}	- The current date. Use any expression supported by PHP `date()` function. Example: `{y-m}` => 16-01.

Live mode

After successful tests (transaction, reversal, close business day) you will receive from maib a certificate, password and endpoints for live mode.

Actual endpoints for live mode:

Is mandatory to change test endpoints to live endpoints in module:

  • Merchant handler: maibmagento/API/Client.php (line 54)
  • Client handler: maibmagento/view/frontend/web/main.js (line 49)

And run commands:

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy en_US <additional locales, e.g.: ro_RO>

Reversal transaction

Transactions can be reversed from the Magento dashboard:

Sale > Orders > View order > Invoices > View invoice > Credit memo > Refund

Close business day

Task for mandatory business day close is added in cron job (23:59): maibmagento/etc/crontab.xml

Magento Cron is required to be enabled!

Troubleshooting

All transactions are considered successful it's only if you receive a predictable response from the maib server in the format you know. If you receive any other result (NO RESPONSE, Connection Refused, something else) there is a problem. In this case it is necessary to collect all logs and sending them to maib by email: ecom@maib.md, in order to provide operational support. The following information should be indicated in email:

  • Merchant name
  • Web site name
  • Date and time of the transaction
  • Responses received from the server