收藏
回答

参数格式校验错误

框架类型 问题类型 操作系统 工具版本
小程序 Bug Windows 3.19.5

想让分账接收方就为本商户,用户再确认后才进行完结分账,不过一直出现参数格式校验错误的问题


// 云函数入口函数

exports.main = async (event, context) => {

  const result = await cloud.cloudPay.multiProfitSharing({

    "sub_mch_id": event.sub_mch_id,

    "nonce_str": event.nonce_str,

    "transaction_id": event.transaction_id,

    "out_order_no": 'sharing' + new Date().getTime(),

    "receivers": [{

      "type": "MERCHANT_ID",

      "account": event.sub_mch_id,

      "amount": 1,

      "description": "订单收益"

    }]

  })

  return result

}


回答关注问题邀请回答
收藏

2 个回答

  • A二叉树点单
    A二叉树点单
    01-16

    不要看示例json,对照着请求参数表每个参数不能少,参数类型也必须对

    01-16
    有用
    回复
  • Memory
    Memory
    2021-09-08

    打印一下你的请求参数出来看下

    2021-09-08
    有用
    回复
登录 后发表内容