2017 © Pedro Peláez
 

library myanpay

PHP Package for MyanPay

image

heinzawhtet/myanpay

PHP Package for MyanPay

  • Wednesday, December 10, 2014
  • by HeinZawHtet
  • Repository
  • 1 Watchers
  • 4 Stars
  • 51 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

MyanPay PHP Package

MyanPay integration for PHP with easy., (*1)

Install

You can install this package in two ways., (*2)

Require this package via terminal, (*3)

composer require heinzawhtet/myanpay

Or just require this package in composer.json and run composer update, (*4)

{
    "require": {
        "heinzawhtet/myanpay": "dev-master"
    }
}

Quick Start

First set your MyanPay API credentials and request to server., (*5)


$items = [ [ 'number' => 'P001', 'name' => 'A pecial Birthday', 'ammount' => '1000', 'quantity' => '1', 'desc' => 'Hi Hi' ], [ 'number' => 'P002', 'name' => 'Spray oses', 'ammount' => '1000', 'quantity' => '1', 'desc' => 'Hi Hi' ], ]; $pay = new Heinzawhtet\Myanpay\Myanpay; $pay->setApiUsername('API_USERNAME'); $pay->setApiPassword('API_PASSWORD'); $pay->setApiSignature('API_SIGNATURE'); $pay->setDev(true); // if you are on development $pay->setHeaderImg('YOUR_BRAND_IMG_PATH'); $pay->setCustomerServiceNumber('09 12345678'); $pay->setBrandName('YOUR_STORE_NAME'); $pay->setReturnUrl('http://localhost:1200/return'); // Return Url when payment is ready to complete $pay->setCancelUrl('http://localhost:1200/cancel'); // Cancel Url when payment is canceled return $pay->purchase(array( 'amount' => '2000' , 'items' => $items));

And then complete the purchase, (*6)

    $pay = new Heinzawhtet\Myanpay\Myanpay;

    $pay->setApiUsername('_junio7482443442_myanpayAPI');
    $pay->setApiPassword('Z687FL3W036I06D0');
    $pay->setApiSignature('b98qL7734zo0Fw50mFP4u55p583bkLz44ZY524EMe5rO7hfdzlWq5AN2rx8d');

    $pay->setDev(true);

    $com = $pay->completePurchase(); // complete the purchase
    $detail = $pay->fetchDetail(); // fetch payment details such as buyer's email or shipping address

More detail documentation, comming soon., (*7)

The Versions

10/12 2014

dev-master

9999999-dev http://heinzawhtet.com/myanpay

PHP Package for MyanPay

  Sources   Download

The Requires

 

payment myanpay

10/12 2014

0.1.x-dev

0.1.9999999.9999999-dev http://heinzawhtet.com/myanpay

PHP Package for MyanPay

  Sources   Download

The Requires

 

payment myanpay