The easiest way to integrate your website into iPaymu payment gateway.
The best way to use this package is using composer
composer require flabib/ipaymu
<?php
use Flabib\iPaymu\iPaymu;
$production = true; // Set to false for sandbox
$iPaymu = new iPaymu('your-api-key', $production);
$iPaymu->setURL([
'ureturn' => 'https://your-website',
'unotify' => 'https://your-website',
'ucancel' => 'https://your-website',
]);
<?php
$iPaymu->setBuyer([
'name' => 'your-name',
'phone' => 'your-phone',
'email' => 'your-email',
]);
$iPaymu->isApiKeyValid();
$iPaymu->checkBalance();
$cart = $iPaymu->addCart([
'name' => 'product-name',
'quantity' => 'product-quantity',
'price' => 'product-price',
]);
Please add product to cart first before using this method
$cart = $iPaymu->payCstore('indomaret/alfamart');
$cart = $iPaymu->payVA('cn/bni/bag/mandiri');
$cart = $iPaymu->payBank();
$iPaymu->checkTransaction("transaction-id");
- Fahdi Labib - Forked From - frankyso/iPaymu
See also the list of contributors who participated in this project.