使用微信支付 APIv3 的官方 Java Library wechatpay-apiv3/wechatpay-java
支付时候报错
输入源“/body/sub_mchid”映射到字段“子商户号”必填性规则校验失败,此字段为必填项
解决方式
// 包
com.wechat.pay.java.service.partnerpayments
// 替换为
com.wechat.pay.java.service.payments
例如
// import com.wechat.pay.java.service.partnerpayments.jsapi.model.PrepayWithRequestPaymentResponse;
// import com.wechat.pay.java.service.partnerpayments.jsapi.model.Transaction;
import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
import com.wechat.pay.java.service.payments.model.Transaction;