Home > php教程 > php手册 > body text

Code information details of the Alipay plug-in developed by KoaHub based on Node.js

WBOY
Release: 2016-10-22 00:00:32
Original
1128 people have browsed it

KoaHub platform developed based on Node.js Koa link Alipay plug-in code information details
KoaHub platform developed based on Node.js Koa link Alipay plug-in code information details
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 open source micro mall, WeChat mall, mall source code, three-level distribution, micro fresh food, micro fruit, micro takeaway, micro ordering---professional o2o system
wemall address: http://www.wemallshop.com
Code source: http://js.koahub.com/home/feature/easy-alipay
Code information details of the Alipay plug-in developed by KoaHub based on Node.js

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template