Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用SDK中的getTradeBill申请交易账单,返回的url无法下载账单,返回签名错误SIGN_ERROR #322

Open
Myfanqie opened this issue Dec 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Myfanqie
Copy link

Myfanqie commented Dec 6, 2024

错误描述

我使用参考的例子的写的接口
image
正常返回数据,但是返回的url无法下载
image

image

返回的报错是
{ "code": "SIGN_ERROR", "message": "Http头Authorization值格式错误,请参考《微信支付商户REST API签名规则》" }

为什么会这样,我使用skd中其他的方法是OK的,说明证书,商户号,apiv3都是正确的

maven依赖

    <dependency>
        <groupId>com.github.wechatpay-apiv3</groupId>
        <artifactId>wechatpay-java</artifactId>
        <version>0.2.15</version>
    </dependency>

重现bug的步骤

使用SDK中的getTradeBill申请交易账单,返回的url无法下载账单,返回签名错误SIGN_ERROR。

预期行为

SDK中的getTradeBill申请交易账单,点击response返回的url,下载交易账单文件

导致错误的代码片段

No response

操作系统

macOS

Java 版本

java8

wechatpay-java 版本

0.2.15

其他信息

No response

@Myfanqie Myfanqie added the bug Something isn't working label Dec 6, 2024
@wswdavid
Copy link

wswdavid commented Dec 6, 2024

返回的链接也是需要使用V3接口的签名规则流程发起请求的,或者你可以使用BillDownloadServiceExtension

@Myfanqie
Copy link
Author

Myfanqie commented Dec 6, 2024

返回的链接也是需要使用V3接口的签名规则流程发起请求的,或者你可以使用BillDownloadServiceExtension

返回InputStream,可以的,感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants