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

KoaHub平台基于Node.js开发的Koa 连接支付宝插件代码信息详情的更多相关文章

  1. KoaHub平台基于Node.js开发的Koa JWT认证插件代码信息详情

    koa-jwt Koa JWT authentication middleware. koa-jwt Koa middleware that validates JSON Web Tokens and ...

  2. KoaHub平台基于Node.js开发的Koa router路由插件代码信息详情

    koa-router Router middleware for koa. Provides RESTful resource routing. koa-router       Router mid ...

  3. KoaHub平台基于Node.js开发的Koa EJS渲染插件代码信息详情

    koa-ejs ejs render middleware for koa koa-ejs Koa ejs view render middleware. support all feature of ...

  4. KoaHub平台基于Node.js开发的Koa的skip插件代码详情

    koahub-skip koahub skip middleware koahub skip Conditionally skip a middleware when a condition is m ...

  5. KoaHub平台基于Node.js开发的Koa的简单包装到请求库的类似接口

    co-request co-request promisify wrapper for request co-request Simple wrapper to the request library ...

  6. KoaHub平台基于Node.js开发的Koa的调试实用程序

    debug small debugging utility debug tiny node.js debugging utility modelled after node core's debugg ...

  7. KoaHub平台基于Node.js开发的Koa的连接MongoDB插件代码详情

    koa-mongo MongoDB middleware for koa, support connection pool. koa-mongo koa-mongo is a mongodb midd ...

  8. KoaHub平台基于Node.js开发的Koa的rewrite and index support插件代码详情

    koa-static-server Static file serving middleware for koa with directory, rewrite and index support k ...

  9. KoaHub平台基于Node.js开发的Koa的get/set session插件代码详情

    koa-session2 Middleware for Koa2 to get/set session use with custom stores such as Redis or mongodb ...

随机推荐

  1. Handler消息传递机制——Handler类简洁

    Handler类的主要作用有两个: 在新启动的线程中发送消息. 在主线程中获取.处理消息. 上面的说法很简单,只要分成两步即可:在新启动的线程中发送消息:然后在主线程上获取.并处理消息.但这个过程涉及 ...

  2. BNU Online Judge-34976-数细菌

    题目链接 http://www.bnuoj.com/bnuoj/problem_show.php?pid=34976 题目分析通过a b可以设x,y x+y=a    x+3*y=b  解出x,y, ...

  3. js数组快速排序

    <script type="text/javascript"> var arr = [1, 2, 3, 54, 22, 1, 2, 3]; function quick ...

  4. 微信小程序怎么做出前端table的效果

    wxml代码: <view class="container">     <view class="table">         &l ...

  5. C++ 头文件系列(vector)

    简介 vector头文件包含vector的类模版以及该模版的显示特化版本vector< bool >. vector是C++容器库中非常通用的一种容器,如果你不知道该决定使用哪一种容器,或 ...

  6. 【js 编程艺术】小制作三

    1.html文件 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> < ...

  7. 你不知道的getComputedStyle

    你不知道的getComputedStyle jQuery的css()的底层实现就用到了getComputedStyle这个方法,也许我们用到的很少,但是不得不说这时一个非常强大的函数,下面让我们一探究 ...

  8. java基础知识点---equal,==,hashcode

    1.==比较对象之间的地址是否相同 student a=new student(1); student b=new student(1); a==b   false b=a; a==b   true ...

  9. mybatis关联查询,查询结果多条,却只返回一条记录

    原因是:主表和子表的主键字段相同,可以使用别名!这是因为mybatis的内部实现机制决定的: MyBatis为了降低内存开销,采用ResultHandler逐行读取的JDBC ResultSet结果集 ...

  10. C语言字节数组转换为基本数据类型

    首先,必须明确基本类型在不同环境下字节的大小 这里用到了unsigned char:1  int:4  double:8 自己主要想用的是将字节数组转换为int型,double型 具体来说,将接收到的 ...