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

【急】微信支付分取消订单,完成订单都报错,是不是out_trade_no里应该加上JsonIgnore特性? #2989

Open
zariczhu opened this issue Jan 26, 2024 · 6 comments
Labels
resolved 已解决

Comments

@zariczhu
Copy link

您好,现在用的是Senparc.Weixin.TenPayV3 1.2.1版本。
完成订单和取消订单的时候报错
{"code":"PARAM_ERROR","message":"无法将输入源“/body/out_trade_no”映射到目标字段“商户订单号”中,此字段并非多重字段但被输入源“/uri_template/out_trade_no”映射过了。"}

查看了官方文档,应该是post data里 不要放out_trade_no,所以是不是
CancelServiceOrderRequestData
CompleteServiceOrderRequestData
里的out_trade_no 不应该再放到body里 post过去?
谢谢!

@JeffreySu JeffreySu added the task label Jan 29, 2024
@JeffreySu
Copy link
Owner

@zariczhu 是否方便提供一下你程序里面调用接口的代码(请脱敏)?

@zariczhu
Copy link
Author

zariczhu commented Feb 5, 2024

@JeffreySu
----完成支付分订单
PayScoreApis payScoreApis = new Senparc.Weixin.TenPayV3.Apis.PayScoreApis(setting);
var completeServiceOrderResult = payScoreApis.CompleteServiceOrderAsync(requestData).GetAwaiter().GetResult();

--取消支付分订单
PayScoreApis payScoreApis = new PayScoreApis(setting);
var createServiceOrderResult = payScoreApis.CancelServiceOrderAsync(requestData).GetAwaiter().GetResult();

另外,我下载了你的源代码,这样改就可以用了
image

image

@JeffreySu
Copy link
Owner

@zariczhu 好的,已经安排修改和测试,今日会发布,谢谢!

@zariczhu
Copy link
Author

zariczhu commented Feb 7, 2024

谢谢

@zariczhu
Copy link
Author

@JeffreySu 请问发布了吗

JeffreySu added a commit that referenced this issue Feb 19, 2024
TenPayV3 v1.2.1.1 解决微信支付分、完成订单参数可为空的问题 Issue #2989 感谢 @zariczhu
@JeffreySu
Copy link
Owner

@zariczhu 刚刚发布,非常感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolved 已解决
Projects
None yet
Development

No branches or pull requests

2 participants