Minimum SDK to process payment with Digicel Moncash Payment Gateway
- Create Payment Transaction and get gateway URL (Moncash Checkout)
- Get Transaction Details by Transaction and Order ID
composer require midsonlajeanty/php-moncash-sdk
// 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();
// 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');
You have a lot of options to contribute to this project ! You can :