Skip to content

midsonlajeanty/php-moncash-sdk

Repository files navigation

Moncash Logo

Build Status Total Downloads Latest Stable Version License

Minimum SDK to process payment with Digicel Moncash Payment Gateway

Features

  • Create Payment Transaction and get gateway URL (Moncash Checkout)
  • Get Transaction Details by Transaction and Order ID

Getting started

composer require midsonlajeanty/php-moncash-sdk 

Usage

Init Payment and get Payment URL (Moncash Checkout)

// Init Payment
use Mds\Moncash\Moncash;

// Create Moncash Instance
$moncash = new Moncash(CLIENT_ID, CLIENT_SECRET);

// Make Paiment with OrderId and Amount
$payment = $moncash->makePayment('ORDER-001', 100);

// Get Payment URL  (Moncash Checkout)
$payment->getRedirect();

Get Transaction Details by Transaction and Order ID

// Init Payment
use Mds\Moncash\Moncash;

// Create Moncash Instance
$moncash = new Moncash(CLIENT_ID, CLIENT_SECRET);

// Get Payment Details with TransactionId provided by Moncash.
$details = $moncash->getPaymentDetailsByTransactionId('TRANSACTION_ID');

// Get Payment Details with OrderId provided by your app.
$details = $moncash->getPaymentDetailsByOrderId('ORDER_ID');

Contributing

You have a lot of options to contribute to this project ! You can :