2017 © Pedro Peláez
 

library laravel-alipay

the alipay package of laravel 5

image

crisen/laravel-alipay

the alipay package of laravel 5

  • Wednesday, June 14, 2017
  • by crisenchou
  • Repository
  • 1 Watchers
  • 0 Stars
  • 37 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

laravel-alipay

支付宝扫码支付, (*1)

安装

composer require "crisen/laravel-alipay":"dev-master", (*2)

文档

  1. 注册服务提供者 config目录下app.php文件, (*3)

    'providers' => [  
        ...
        Crisen\LaravelAlipay\AlipayServiceProvider::class,
    }
  2. 添加门面, (*4)

    'aliases' => [
        ...
    'Alipay' => Crisen\LaravelAlipay\Facades\Alipay::class,
    ]
    
  3. 配置文件, (*5)

    php artisan vendor publish 

使用方法

扫码支付

$alipay = Alipay::factory('precreate');
$alipay->setBizContent([
    'out_trade_no' => $outTradeNo,
    'subject' => 'test',
    'total_amount' => 1,
    'body' => 'test goods',
])->send();
if($alipay->isSuccessful() && $alipay->isTradeStatusOk()){
    $codeUrl = $alipay->getCodeUrl();
    echo $codeUrl;
}

订单查询

$alipay = Alipay::factory('query');
$bizCOntent = [
    'out_trade_no' => 'xxx'//数据库中的订单号
];
$alipay->setBizContent($bizContent)->send();
if($alipay->isSuccessful() && $alipay->isTradeStatusOk()){
    //dd($alipay->getRequestData();
}

异步通知

 $alipay = Alipay::factory('notify')->options($request->all());
 if ($alipay->isPaid()) {
    // echo $alipay->getOutTradeNo();
 } 

License

MIT, (*6)

The Versions

14/06 2017

dev-master

9999999-dev

the alipay package of laravel 5

  Sources   Download

MIT

The Requires

 

by Avatar crisenchou

alipay 扫码支付 支付宝扫码支付

09/12 2016

v0.0.2

0.0.2.0

the alipay package of laravel 5

  Sources   Download

MIT

The Requires

 

by Avatar crisenchou

alipay 扫码支付 支付宝扫码支付