2017 © Pedro Peláez
 

library omnipay-heepay

汇付宝接口

image

chingli/omnipay-heepay

汇付宝接口

  • Friday, February 10, 2017
  • by MrChingLi
  • Repository
  • 1 Watchers
  • 3 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

omnipay-heepay

汇付宝使用接口, (*1)

安装

composer require chingli/omnipay-heepay

使用

$gateway = Omnipay::create('Heepay');
$gateway->setPartner(config('payment.heepay.partner'));
$gateway->setKey(config('payment.heepay.KEY'));
$gateway->setDesKey(config('payment.heepay.DESKEY'));
$gateway->setNotifyurl(config('payment.heepay.notify'));
$order=array(
    'orderId'=>'B1218177936793836',         //订单id
    'orderTime'=>date('YmdHis', time()),    //提交时间
    'cardNum'=>'1111111111111111',          //卡号
    'cardPwd'=>'1111111111111111',          //卡密
    'amount'=>50,                           //重置金额
    'cardType'=>10                          //卡类型 
);
$request  = $gateway->purchase($order);
$response = $request->send();
return $response->isSuccessful();

异步通知回调

$gateway = Omnipay::create('Heepay');
$options = ['request_params'=> $_REQUEST,];
$response = $gateway->completePurchase($options)->send();
if ($response->isSuccessful() && $response->getTransactionReference()) {
    //支付成功后获取订单id
    exit($response->getOrderId());
} else {
    //支付失败通知.
    exit('支付失败');
}

The Versions

10/02 2017

dev-master

9999999-dev

汇付宝接口

  Sources   Download

MIT

The Requires

 

by ChingLi

21/12 2016

v1.1

1.1.0.0

汇付宝接口

  Sources   Download

MIT

The Requires

 

by ChingLi

20/12 2016

v1.0

1.0.0.0

汇付宝接口

  Sources   Download

MIT

The Requires

 

by ChingLi