KoaHub基于Node.js开发的连接支付宝插件代码信息详情
程序员文章站
2022-04-06 08:53:39
...
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.
Example
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.
Example
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开发的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.
Example
var alipay = require('easy-alipay').Payment;
var paymentUrl = alipay.createDirectPay(partnerId, partnerKey, sellerEmail, requestData.subject,
requestData.outTradeNumber, requestData.totalFee, requestData.body, requestData.showUrl,
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.
Example
var alipayNotification = require('easy-alipay').Notification;
try {
alipayNotification.directPayNotify(notifyData, partnerId, partnerKey);
} catch (err) {
console.error(err);
}
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
上一篇: 模拟草料上传二维码图片,得出识别结果
下一篇: 思梦PHP-阿里大鱼手机验证码
推荐阅读
-
基于 Koa平台Node.js开发的KoaHub.js连接打印机的代码
-
KoaHub平台基于Node.js开发的router路由插件代码
-
KoaHub基于Node.js开发的连接支付宝插件代码信息详情
-
基于 Koa平台Node.js开发的KoaHub.js连接打印机的代码
-
KoaHub基于Node.js开发的Koa EJS渲染插件代码信息详情
-
KoaHub平台基于Node.js开发的router路由插件代码
-
KoaHub基于Node.js开发的连接支付宝插件代码信息详情
-
KoaHub基于Node.js开发的Koa EJS渲染插件代码信息详情
-
KoaHub基于Node.js开发的Koa JWT认证插件代码信息详情
-
KoaHub基于Node.js开发的Koa JWT认证插件代码信息详情