收藏
回答

输入源“/body/sub_mchid”映射到字段“子商户号/二级商户号”

[{"code":"PARAM_ERROR","detail":{"location":"body","value":""},"message":"输入源“/body/sub_mchid”映射到字段“子商户号/二级商户号”必填性规则校验失败,此字段为必填项"}]

我是普通商户,官方sdk 要求必写

// 构建service
AppServiceExtension service = new AppServiceExtension.Builder().config(Config****).build();
// request.setXxx(val)设置所需参数,具体参数可见Request定义
// 跟之前下单示例一样,填充预下单参数
PrepayRequest request = new PrepayRequest();
Amount amount = new Amount();
amount.setTotal(10);
request.setAmount(amount);
request.setDescription("测试商品标题");
request.setSpAppid(**);
request.setSpMchid(**);
request.setNotifyUrl("https://notify_url");
request.setOutTradeNo("out_trade_no_0010000");
// 调用下单方法,得到应答
// response包含了调起支付所需的所有参数,可直接用于前端调起支付
PrepayWithRequestPaymentResponse response = service.prepayWithRequestPayment(request,**);



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

1 个回答

登录 后发表内容