首页 > php教程 > php手册 > KoaHub基于Node.js开发的连接支付宝插件代码信息详情

KoaHub基于Node.js开发的连接支付宝插件代码信息详情

WBOY
发布: 2016-10-22 00:00:32
原创
1134 人浏览过

KoaHub平台基于Node.js开发的Koa 连接支付宝插件代码信息详情
KoaHub平台基于Node.js开发的Koa 链接支付宝插件代码信息详情
easy-alipay

alipay payment & notification APIs
easy-alipay
Nodejs based Alipay payment & notification APIs
API
Payment.createDirectPay()

Create an Ali direct payment, return an Ali url so client can go to Ali pages to process payments.
Examplevar alipay = require('easy-alipay').Payment;<br> var paymentUrl = alipay.createDirectPay(partnerId, partnerKey, sellerEmail, requestData.subject,<br>       requestData.outTradeNumber, requestData.totalFee, requestData.body, requestData.showUrl,<br>       notifyUrl, returnUrl);
Payment.createDirectPayWap()

Returns an promise. WAP version of Payment.createDirectPay(), which submit a XML format request to ALIPAY and returns an redirect url with valid request token.
Notification.directPayNotify(notification, partnerId, partnerKey)

Returns an promise which resolve with a JSON version of ALIPAY payment notification, and reject when the notification is not from ALIPAY or signature verification failed.
Examplevar alipayNotification = require('easy-alipay').Notification;<br> try {<br>   alipayNotification.directPayNotify(notifyData, partnerId, partnerKey);<br> } catch (err) {<br>   console.error(err);<br> }
Notification.directPayNotifyWap(notification, partnerId, partnerKey)

WAP version of Notification.directPayNotify(), which accepts a XML format payment notification.
LICENSE
MIT

wemall 开源微商城 ,微信商城,商城源码,三级分销,微生鲜,微水果,微外卖,微订餐---专业的o2o系统
wemall地址:http://www.wemallshop.com
代码来源:http://js.koahub.com/home/feature/easy-alipay
KoaHub基于Node.js开发的连接支付宝插件代码信息详情

来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门推荐
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板