2017 © Pedro Peláez
 

yii2-extension yii2-alipay

Yii framework alipay

image

leyestd/yii2-alipay

Yii framework alipay

  • Saturday, August 29, 2015
  • by wanglong
  • Repository
  • 5 Watchers
  • 9 Stars
  • 63 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

yii2-alipay

担保交易扩展, (*1)

安装 composer require leyestd/yii2-alipay "dev-master", (*2)

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

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

'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'

];, (*5)

使用, (*6)

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

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

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

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

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

echo $html_text;, (*12)

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

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

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

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

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

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

日志, (*19)

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

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

The Versions

29/08 2015

dev-master

9999999-dev

Yii framework alipay

  Sources   Download

BSD-3-Clause

The Requires

 

by Long Wang

yii2 alipay yii2 alipay