2017 © Pedro Peláez
 

library yii2-alipay

Yii framework alipay

image

life2016/yii2-alipay

Yii framework alipay

  • Wednesday, June 8, 2016
  • by ran
  • Repository
  • 1 Watchers
  • 3 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

yii2-alipay

担保交易扩展, (*1)

支付宝官方文档改编。。支持手机wap 及pc支付, (*2)

安装 composer require life2016/yii2-alipay "*", (*3)

配置 设置common/config/params.php, (*4)

return [ 'adminEmail' => 'xxxxx@qq.com',, (*5)

'supportEmail' => 'xxxxxxx@qq.com',

'user.passwordResetTokenExpire' => 3600,

'showUrl'=>'http://www.sasr.cn/index.php',

'notifyUrl' => 'http://www.sasr.cn/index.php/ali-return/notify',  

'returnUrl' => 'http://www.sasr.cn/index.php/ali-return/returned', 

'aliPartner' => 'xxxxxxxxxxxxx',

'aliSellerEmail' => 'xxxxxx@126.com',

'aliKey'=> 'xxxxxxxx'

];, (*6)

使用, (*7)

use leyestd\alipay\Alipay;, (*8)

use leyestd\alipay\lib\AlipaySubmit;, (*9)

//参数为支付宝所需,详细请看构造方法, (*10)

$alipay=new Alipay($order->orderNumber, ltrim($productSkus),$cost,$order->notes,$show_url,$recipient->name,$recipient->address,$recipient->postcode,$recipient->phone,$recipient->mobile);, (*11)

$html_text = (new AlipaySubmit($alipay->alipay_config))->buildRequestForm($alipay->parameter, "get", "确认");, (*12)

echo $html_text;, (*13)

支付宝支付后返回, (*14)

$alipayNotify = new AlipayNotify((new Aliconfig)->getAliconfig());, (*15)

$verify_result = $alipayNotify->verifyReturn();, (*16)

以下为支付宝支付后通知, (*17)

$alipayNotify = new AlipayNotify((new Aliconfig)->getAliconfig());, (*18)

$verify_result = $alipayNotify->verifyNotify();, (*19)

日志, (*20)

默认在frontend/runtime/logs/alilog.txt 需要写入权限, (*21)

也可自己修改AlipayCore下的logResult方法到指定位置, (*22)

The Versions

08/06 2016

dev-master

9999999-dev

Yii framework alipay

  Sources   Download

The Requires

 

08/06 2016

1.0

1.0.0.0

Yii framework alipay

  Sources   Download

The Requires