Skip to content

合单APP支付

使用合单支付接口,用户只输入一次密码,即可完成多个订单的支付。目前最多一次可支持50笔订单进行合单支付。 官方文档

js
const { 
Formatter
,
Rsa
} =
require
('wechatpay-axios-plugin')
wxpay
.
v3
.
combineTransactions
.
app
.
post
({
combine_appid
,
combine_mchid
,
combine_out_trade_no
,
scene_info
,
sub_orders
,
combine_payer_info
,
time_start
,
time_expire
,
notify_url
,
limit_pay
,
contract_info
,
}) .
then
(({
data
: {
prepay_id
:
prepayid
,
contract_result
, }, }) => {
const
noncestr
=
Formatter
.
nonce
();
const
timestamp
= '' +
Formatter
.
timestamp
();
return {
appid
,
partnerid
,
prepayid
,
noncestr
,
timestamp
,
package
: 'Sign=WXPay',
sign
:
Rsa
.
sign
(
Formatter
.
joinedByLineFeed
(
appid
,
timestamp
,
noncestr
,
prepayid
),
merchantPrivateKeyInstance
) } })

Released under the MIT License. (SITEMAP)