收藏
回答

/v3/pay/transactions/jsapi 401 Unauthorized

Caused by: feign.FeignException$Unauthorized: [401 Unauthorized] during [POST] to [https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi] [WePayClient#getPrepayInfo(String,String)]: []

at feign.FeignException.clientErrorStatus(FeignException.java:224)

at feign.FeignException.errorStatus(FeignException.java:203)

at feign.FeignException.errorStatus(FeignException.java:194)

at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:104)

at feign.ResponseHandler.decodeError(ResponseHandler.java:136)

at feign.ResponseHandler.handleResponse(ResponseHandler.java:70)

at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:114)

at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:70)

at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:96)

at jdk.proxy4/jdk.proxy4.$Proxy493.getPrepayInfo(Unknown Source)

at com.pcng.finance.service.WxPaymentService.getPrepayInfo(WxPaymentService.java:123)

at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)

at java.base/java.lang.reflect.Method.invoke(Method.java:580)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)

at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:751)

at io.seata.spring.annotation.AdapterInvocationWrapper.proceed(AdapterInvocationWrapper.java:57)

... 66 common frames omitted




感觉这个401是没有进入微信支付的系统,不是签名错误的401。如果是后者,应该返回一个json, 但是没返回结果而是抛异常了。有思路吗?


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

1 个回答

  • Sidney
    Sidney
    05-19

    Authorization: WECHATPAY2-SHA256-RSA2048

    可以了,把Authorization: 去掉就行了。

    05-19
    有用
    回复
登录 后发表内容