flabib / ipaymu
iPaymu-PHP API Package Library
1.0.8
2020-01-27 17:12 UTC
Requires
- php: >=5.3.0
- ext-curl: *
Requires (Dev)
- fzaninotto/faker: ^1.9@dev
- mockery/mockery: ^1.2.3
- phpunit/phpunit: ^8.3
This package is auto-updated.
Last update: 2025-03-28 05:46:47 UTC
README
The easiest way to integrate your website into iPaymu payment gateway.
Installation
The best way to use this package is using composer
composer require flabib/ipaymu
Usage
Initialization
<?php use Flabib\iPaymu\iPaymu; $production = true; // Set to false for sandbox $iPaymu = new iPaymu('your-api-key', $production);
Set URL
$iPaymu->setURL([ 'ureturn' => 'https://your-website', 'unotify' => 'https://your-website', 'ucancel' => 'https://your-website', ]);
Set Buyer
<?php $iPaymu->setBuyer([ 'name' => 'your-name', 'phone' => 'your-phone', 'email' => 'your-email', ]);
Check API Key Validity
$iPaymu->isApiKeyValid();
Check Balance
$iPaymu->checkBalance();
Add Product to Cart
$cart = $iPaymu->addCart([ 'name' => 'product-name', 'quantity' => 'product-quantity', 'price' => 'product-price', ]);
Pay Cstore
Please add product to cart first before using this method
$cart = $iPaymu->payCstore('indomaret/alfamart');
Pay VA
$cart = $iPaymu->payVA('cn/bni/bag/mandiri');
Pay Bank
$cart = $iPaymu->payBank();
Check Transaction Status
$iPaymu->checkTransaction("transaction-id");
Authors
- Fahdi Labib - Forked From - frankyso/iPaymu
See also the list of contributors who participated in this project.