Git Product home page Git Product logo

Comments (6)

befinal avatar befinal commented on June 18, 2024

没有计划直接做成egg中间件

from node-tenpay.

fishlao avatar fishlao commented on June 18, 2024

看了EGG的官方文档,和你写的关于KOA中间件,KOA的中间件应该也是使用在EGG上的

from node-tenpay.

befinal avatar befinal commented on June 18, 2024

你可以试一下吧,我们这边没有使用egg。

from node-tenpay.

songzhengxu avatar songzhengxu commented on June 18, 2024

只是没有封装中间件而已, 也可以直接用的, 我现在就是直接在用

from node-tenpay.

shellteo avatar shellteo commented on June 18, 2024

只是没有封装中间件而已, 也可以直接用的, 我现在就是直接在用

请问 微信消息通知 怎么在eggjs中使用的

from node-tenpay.

mani95lisa avatar mani95lisa commented on June 18, 2024

@fishlao @shellteo 使用方式如下

在配置里面加上
const bodyParserConfig = {
enable: true,
encoding: 'utf8',
formLimit: '100kb',
jsonLimit: '100kb',
strict: true,
queryString: {
arrayLimit: 100,
depth: 5,
parameterLimit: 1000,
},
enableTypes: [ 'json', 'form', 'text' ],
extendTypes: {
text: [ 'text/xml', 'application/xml' ],
},
};
// 覆盖egg自带的配置
config.bodyParser = bodyParserConfig;

在路由上
router.post('/wechat/pay/notify', api.middleware('pay'), wechat.payNotify);

这样就可以了

from node-tenpay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.