2017 © Pedro Peláez
 

library one_pay

Integrated payment in laravel simple onepay

image

giicms/one_pay

Integrated payment in laravel simple onepay

  • Tuesday, September 13, 2016
  • by giicms
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Installation

The preferred way to install this extension is through composer., (*1)

Either run, (*2)

composer require "giicms/one_pay" "dev-master" or add, (*3)

"giicms/one_pay": "dev-master" to the require section of your application's composer.json file., (*4)

$onepay = new Onepay();, (*5)

// cài đặt thông số bắt buộc, (*6)

$onepay->setupMerchant($merchant, $access, $secure); 

// $order_info bat buoc viet tieng Viet, khong dau, va it hon 30 ky tu, nen dung order_id. // Noi dia, (*7)

$refer = $onepay->build_link($order_id, $total_amount, $order_info, $url_return); 

// Quoc te, (*8)

$refer = $onepay->build_link_vn($order_id, $total_amount, $order_info, $url_return); 

// Chuyển trang, (*9)

$onepay = new Onepay(); 
// cài đặt thông số bắt buộc 
$onepay->setupMerchant($merchant, $access, $secure); 
$hashValidated = $onepay->validate($_GET); 
//Lấy thông tin giao dịch 
// Define Variables 
// ---------------- 
// Extract the available receipt fields from the VPC Response 
// If not present then let the value be equal to 'No Value Returned' 
// Standard Receipt Data 
$amount = $onepay->null2unknown ( $_GET ["vpc_Amount"] ); 
$locale = $onepay->null2unknown ( $_GET ["vpc_Locale"] ); 
$batchNo = $onepay->null2unknown ( $_GET ["vpc_BatchNo"] ); 
$command = $onepay->null2unknown ( $_GET ["vpc_Command"] ); 
$message = $onepay->null2unknown ( $_GET ["vpc_Message"] ); 
$version = $onepay->null2unknown ( $_GET ["vpc_Version"] ); 
$cardType = $onepay->null2unknown ( $_GET ["vpc_Card"] ); 
$orderInfo = $onepay->null2unknown ( $_GET ["vpc_OrderInfo"] ); 
$receiptNo = $onepay->null2unknown ( $_GET ["vpc_ReceiptNo"] ); 
$merchantID = $onepay->null2unknown ( $_GET ["vpc_Merchant"] ); 
$authorizeID = $onepay->null2unknown ( $_GET ["vpc_AuthorizeId"] ); 
$merchTxnRef = $onepay->null2unknown ( $_GET ["vpc_MerchTxnRef"] ); 
$transactionNo = $onepay->null2unknown ( $_GET ["vpc_TransactionNo"] ); 
$acqResponseCode = $onepay->null2unknown ( $_GET ["vpc_AcqResponseCode"] ); 
$txnResponseCode = $onepay->null2unknown ( $_GET ["vpc_TxnResponseCode"] ); 
$transStatus = ""; 
if($hashValidated=="CORRECT" && $txnResponseCode=="0"){ 
    $transStatus = 2; 
}elseif ($txnResponseCode!="0"){ 
    $transStatus = 0; 
}elseif ($hashValidated=="INVALID HASH"){ 
    $transStatus = 3; 
} 
// code xu ly cua ban

The Versions

13/09 2016

dev-master

9999999-dev https://github.com/giicms/one_pay

Integrated payment in laravel simple onepay

  Sources   Download

MIT

The Requires

 

laravel onepay