2017 © Pedro Peláez
 

library mobicard

Tích hợp thanh toán thẻ cào qua Ngân Lượng cho website Laravel 5.2 tở lên.

image

santran/mobicard

Tích hợp thanh toán thẻ cào qua Ngân Lượng cho website Laravel 5.2 tở lên.

  • Saturday, April 21, 2018
  • by santran
  • Repository
  • 0 Watchers
  • 1 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 14 % Grown

The README.md

Laravel 5 MobiCard

Tích hợp thanh toán thẻ cào qua Ngân Lượng cho website Laravel 5.2 tở lên.

Total Downloads Paypal Donate, (*1)


Install with composer., (*2)

Install (Laravel)

Install via composer, (*3)

composer require santran/mobicard:dev-master

Add Service Provider to config/app.php in providers section, (*4)

SanTran\MobiCard\MobiCardServiceProvider::class,

Add Facade to config/app.php in aliases section:, (*5)

'MobiCard' => SanTran\MobiCard\MobiCardFacade::class,

Publish config file, open console and enter bellow command:, (*6)

php artisan vendor:publish

Config file 'mobicard.php' will be copy to config/smartlogs.php, you can change any config on that file for MobiCard 'MERCHANT_ID' => "36680", 'MERCHANT_PASSWORD' => "matkhauketnoi", 'EMAIL_RECEIVE_MONEY' => "demo@nganluong.vn", (*7)

How to use ? Open your Controller. Add this line on above file, remember after 'namespace ...' keywork:, (*8)

use MobiCard;

on function, (*9)

$serial = $request->get('serial', "");
$pin = $request->get('pin', "");
$type = $request->get('select_method', "");

$arytype = array(92 => 'VMS', 93 => 'VNP', 107 => 'VIETTEL', 120 => 'GATE');
//Tiến hành kết nối thanh toán Thẻ cào.
$coin1 = rand(10, 999);
$coin2 = rand(0, 999);
$coin3 = rand(0, 999);
$coin4 = rand(0, 999);
$ref_code = $coin4 + $coin3 * 1000 + $coin2 * 1000000 + $coin1 * 100000000;

$rs = MobiCard::CardPay($pin, $serial, $type, $ref_code, "", "", "");

if ($rs->error_code == '00') {
    // Cập nhật data tại đây
    echo ''; //$total_results;
} else {
    echo '';
}

on your views., (*10)



Số Seri :
Mã số thẻ :

The Versions

21/04 2018

dev-master

9999999-dev

Tích hợp thanh toán thẻ cào qua Ngân Lượng cho website Laravel 5.2 tở lên.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by San Tran