Flabib / iPaymu

Ipaymu API PHP Class Library, Easiest way to integrate iPaymu payment gateway with your business

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iPaymu-php

The easiest way to integrate your website into iPaymu payment gateway.

Build Status Latest Stable Version Total Downloads Latest Unstable Version License StyleCI

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

See also the list of contributors who participated in this project.

About

Ipaymu API PHP Class Library, Easiest way to integrate iPaymu payment gateway with your business

License:GNU General Public License v3.0


Languages

Language:PHP 100.0%