karyamedia / ipay88
iPay88 payment gateway module
Installs: 114 633
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 4
Forks: 21
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: 5.4.*
This package is not auto-updated.
Last update: 2024-12-18 21:41:45 UTC
README
Ipay88 payment gateway module.
NOTE: Your require to request demo account from techsupport@ipay88.com.my
Installation
I've make this project available to install via Composer with following command:
$ composer require karyamedia/ipay88 dev-master
Example Controller
<?php class Payment { protected $_merchantCode; protected $_merchantKey; public function __construct(){ parent::__construct(); /** * MerchantCode confidential * MerchantKey confidential */ $this->_merchantCode = 'xxxxxx'; $this->_merchantKey = 'xxxxxxxxx'; } public function index(){ $request = new IPay88\Payment\Request($this->_merchantKey); $this->_data['merchantCode'] = $request->setMerchantCode($this->_merchantCode); $this->_data['paymentId'] = $request->setPaymentId(1); $this->_data['refNo'] = $request->setRefNo('EXAMPLE0001'); $this->_data['amount'] = $request->setAmount('0.50'); $this->_data['currency'] = $request->setCurrency('MYR'); $this->_data['prodDesc'] = $request->setProdDesc('Testing'); $this->_data['userName'] = $request->setUserName('Your name'); $this->_data['userEmail'] = $request->setUserEmail('email@example.com'); $this->_data['userContact'] = $request->setUserContact('0123456789'); $this->_data['remark'] = $request->setRemark('Some remarks here..'); $this->_data['lang'] = $request->setLang('UTF-8'); $this->_data['signature'] = $request->getSignature(); $this->_data['responseUrl'] = $request->setResponseUrl('http://example.com/response'); $this->_data['backendUrl'] = $request->setBackendUrl('http://example.com/backend'); IPay88\Payment\Request::make($this->_merchantKey, $this->_data); } public function response(){ $response = (new IPay88\Payment\Response)->init($this->_merchantCode); echo "<pre>"; print_r($response); } }
Credits
Reference
https://github.com/cchitsiang/ipay88
https://github.com/fastsafety/ipay88
Lisence
MIT © Karyamedia. Please see License File for more information.