frankyso/ipaymu

iPaymu-PHP API Package Library

1.0.3 2019-11-25 08:17 UTC

This package is auto-updated.

Last update: 2024-04-29 04:19:52 UTC


README

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 frankyso/ipaymu

Usage

Initialization

<?php
use frankyso\iPaymu\iPaymu;

$iPaymu = new iPaymu('your-api-key', ['ureturn','unotify','ucancel']);

Set UReturn URL

<?php
use frankyso\iPaymu\iPaymu;

$iPaymu = new iPaymu('your-api-key');
$iPaymu->setUreturn('https://your-website');

Set Unotify URL

<?php
use frankyso\iPaymu\iPaymu;

$iPaymu = new iPaymu('your-api-key');
$iPaymu->setUnotify('https://your-website');

Set UCancel URL

<?php
use frankyso\iPaymu\iPaymu;

$iPaymu = new iPaymu('your-api-key');
$iPaymu->setUcancel('https://your-website');

Check Balance

<?php
use frankyso\iPaymu\iPaymu;

$iPaymu = new iPaymu('your-api-key');
$iPaymu->checkBalance();

Check API Key Validity

<?php
use frankyso\iPaymu\iPaymu;

$iPaymu = new iPaymu('your-api-key');
$iPaymu->isApiKeyValid();

Add Product to Cart

<?php
use frankyso\iPaymu\iPaymu;

$iPaymu = new iPaymu('your-api-key');
$cart = $iPaymu->cart()->add("id","product-name", 'product-quantity','product-price');

Remove Product From Cart

<?php
use frankyso\iPaymu\iPaymu;

$iPaymu = new iPaymu('your-api-key');
$cart = $iPaymu->cart();
$cart->remove('product-id');

Checkout Transaction

in this package we use cart type transaction so you must checkout after adding your product

<?php
use frankyso\iPaymu\iPaymu;

$iPaymu = new iPaymu('your-api-key');
$cart = $iPaymu->cart()->add("id","product-name", 'product-quantity','product-price');


$cart->checkout();

Check Transaction Status - @deprecated

To checking your account transaction status (deposit, transfer, send money).

to be honest, this endpoint still working, but somehow i cannot find transaction-id from any other endpoint.

<?php
use frankyso\iPaymu\iPaymu;

$iPaymu = new iPaymu('your-api-key');
$iPaymu->checkTransaction("transaction-id");

Authors

  • Franky So - Initial work - Konnco

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