Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好,能不能在支付下单的时候增加一个attach参数 #16

Open
acguokailin opened this issue Nov 12, 2020 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@acguokailin
Copy link

attach这个参数有时再说明不同的订单支付回调的时候可以自定义一些有效信息
我们自己加的话npm install你这个包又没有了,能不能麻烦加一个参数到插件里面,多谢
// 生成支付签名
_firstSignOrder(openid, order) {
const {
app,
ctx,
service,
} = this;
const {
appId,
mchId,
notifyUrl,
} = app.config.mp;
const params = {
openid: openid || '',
appid: appId,
mch_id: mchId,
attach:order.attach,
nonce_str: service.sign.createNonceStr(),
body: order.body || '我是测试商品',
out_trade_no: order.tradeNo || new Date().getTime(), // 内部订单号
total_fee: order.totalFee || 1, // 单位为分的标价金额
spbill_create_ip: ctx.ip || '127.0.0.1', // 支付提交用户端ip
notify_url: notifyUrl, // 异步接收微信支付结果通知
trade_type: 'JSAPI',
};
params.sign = service.sign.getPaySign(params); // 订单签名,用于验证支付通知
return params;
}

@unclexiao unclexiao self-assigned this Dec 25, 2020
@unclexiao unclexiao added the enhancement New feature or request label Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants