config文件配置支付宝信息
//支付宝 支付配置
'ALI_CONFIG' => array(
'gatewayUrl' => 'https://openapi.alipay.com/gateway.do',//支付宝网关(固定)
'appId' => 'APPID即创建应用后生成',
'rsaPrivateKey' => '由开发者自己生成: 请填写开发者私钥去头去尾去回车,一行字符串',
'alipayrsaPublicKey' => '支付宝公钥,由支付宝生成: 请填写支付宝公钥,一行字符串',
'notifyUrl' => 'http://www.xxxx.com/api.php/CallBack/orderCallBackzfb', // 支付成功通知地址
'returnUrl' => 'http://www.xxxx.com/index.php/Index/index1', // 支付后跳转地址
)
controller支付宝支付接口,前台用form表单提交
/**
* 支付宝支付
*/
public function orderAlipay(){
if (IS_POST){
Vendor('Alipay.aop.AopClient');
Vendor('Alipay.aop.request.Alip