PHPackages                             cusursuz/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. cusursuz/maibapi

ActiveLibrary[Payment Processing](/categories/payments)

cusursuz/maibapi
================

v1.0.2(2y ago)013MITPHPPHP &gt;=8.0.0

Since Apr 26Pushed 2y agoCompare

[ Source](https://github.com/cusursuz/maibapi)[ Packagist](https://packagist.org/packages/cusursuz/maibapi)[ Docs](https://github.com/cusursuz)[ RSS](/packages/cusursuz-maibapi/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (4)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;=8.0.0
- guzzlehttp/guzzle: ~7.0
- guzzlehttp/guzzle-services: ~1.0
- monolog/monolog: ^2.7

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

[](#installation)

- Run `composer require cusursuz/maibapi`

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

    ```
     # Public key chain:
       openssl pkcs12 -in certname.pfx -nokeys -out cert.pem
     # The private key without a password (decrypted):
       openssl pkcs12 -in certname.pfx -nocerts -nodes -out key.pem

    ```
- Need to save the generated keys into map on server to usage in the requests.

USAGE
=====

[](#usage)

- Need to include all libraries

```
