PHPackages                             andrei-filippov/maibapi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. andrei-filippov/maibapi

ActiveLibrary[Payment Processing](/categories/payments)

andrei-filippov/maibapi
=======================

1.0.1(3y ago)07MITPHPPHP &gt;=7.1.0

Since Dec 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/AndreFilippov/maibapi)[ Packagist](https://packagist.org/packages/andrei-filippov/maibapi)[ Docs](https://github.com/indrivo)[ RSS](/packages/andrei-filippov-maibapi/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

MAIB Payment PHP SDK
====================

[](#maib-payment-php-sdk)

#### maib-api

[](#maib-api)

[![N|Solid](https://camo.githubusercontent.com/13ce7f7d3ee38127ba93d1e62b3cc855a1eb71f39449f1b686e50928b9f92342/68747470733a2f2f7777772e6d6169622e6d642f696d616765732f6c6f676f2e737667)](https://www.maib.md)

CONTENTS OF THIS FILE
=====================

[](#contents-of-this-file)

- Introduction
- Requirements
- Recommended modules
- Installation
- Before usage
- Usage
- Troubleshoting
- Maintainers

INTRODUCTION
============

[](#introduction)

The MAIB Payment PHP SDK is used to easily integrate the MAIB Payment into your project. Based on the Guzzle Libraries to connect and process the requests with the Bank server and the Monolog library to log the requests responses.

The MAIB Payment PHP SDK has 2 ways of payment.

- One way is SMS Transaction (registerSmsTransaction). When the client's money transfers on the merchant account instantly when the user do the payment. This way is recommended use.
- Another way is DMS Transaction (registerDmsAuthorization). When the client's money has been blocked on their account before you confirm that transaction. This way is mostly used in the case of the long shipping time.

That Payment PHP SDK includes 6 methods to process the payments:

- Registering transactions.
- Registering DMS authorization.
- Executing a DMS transaction.
- Get transaction result.
- Transaction reversal.
- Close the work day.

REQUIREMENTS
============

[](#requirements)

- PHP: &gt;=7.1.0
- guzzlehttp/guzzle: ~6.0
- guzzlehttp/guzzle-services: ~1.0
- monolog/monolog: ^2.7

INSTALLATION
============

[](#installation)

- Run `composer require maib/maibapi ^2.0`

BEFORE USAGE
============

[](#before-usage)

To initiate an payment transaction you need to obtain the SSL certificate, to get the access by IP and to set the callback URL.

- Need to write an email to maib commerce support:  with the request including The Merchant IP and callback URL, to receive access and certificate for testing.
- When you get the certificate, you need to generate the private and the public keys, using the terminal package OpenSSL
    - openssl pkcs12 -in 0149583.pfx -nocerts -out key.pem
    - openssl pkcs12 -in 0149583.pfx -clcerts -nokeys -out pcert.pem
    - openssl pkcs12 -in 0149583.pfx -cacerts -nokeys -out cacert.pem
- Need to save the generated keys into map on server to usage in the requests.

USAGE
=====

[](#usage)

- Need to include all libraries

```
