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

小程序根据prepayId发起支付 #942

Closed
ajiader opened this issue Feb 28, 2024 · 1 comment
Closed

小程序根据prepayId发起支付 #942

ajiader opened this issue Feb 28, 2024 · 1 comment

Comments

@ajiader
Copy link

ajiader commented Feb 28, 2024

根据文档调用小程序接口返回prepayId存入数据库,微信官方文档说 prepayId 两小时内有效
也就是说可以直接用prepayId发起支付,文档貌似没有讲这个,看源码有这个getInvokeConfig方法 但是不知道怎么调用
image

@yansongda
Copy link
Owner

直接 Pay::wechat()->app($order); 即可,SDK 内部已经自动处理了,无需关系 prepay_id 。

详情:https://pay.yansongda.cn/docs/v3/wechat/pay.html#app-%E6%94%AF%E4%BB%98

如果感兴趣可参考源码:https://github.com/yansongda/pay/blob/master/src/Shortcut/Wechat/AppShortcut.php

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

No branches or pull requests

2 participants