PHP code example of yiiviet / yii2-payment
1. Go to this page and download the library: Download yiiviet/yii2-payment library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yiiviet / yii2-payment example snippets
$baoKim->purchase([
'order_id' => 2,
'total_amount' => 500000,
'url_success' => '/'
]);
$nganLuong->purchase([
'bank_code' => 'VCB',
'buyer_fullname' => 'vxm',
'buyer_email' => '[email protected] ',
'buyer_mobile' => '0909113911',
'total_amount' => 10000000,
'order_code' => microtime()
]);
$onePay->purchase([
'ReturnURL' => 'http://localhost/',
'OrderInfo' => time(),
'Amount' => 500000,
'TicketNo' => '127.0.0.1',
'AgainLink' => 'http://localhost/',
'Title' => 'Hello World',
'MerchTxnRef' => time()
]);
$vnPayment->purchase([
'TxnRef' => time(),
'OrderType' => 100000,
'OrderInfo' => time(),
'IpAddr' => '127.0.0.1',
'Amount' => 1000000,
'ReturnUrl' => 'http://localhost'
]);
$vtcPay->purchase([
'amount' => 100000,
'reference_number' => time()
]);
$momo->purchase([
'amount' => 100000,
'orderId' => time(),
'requestId' => time(),
'returnUrl' => 'http://localhost',
'notifyUrl' => 'http://localhost/notify',
]);