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

Add payment scan notify handler #593

Merged
merged 2 commits into from
Feb 14, 2017
Merged

Conversation

acgrid
Copy link
Contributor

@acgrid acgrid commented Feb 14, 2017

微信支付扫码模式一:商户必须在公众平台后台设置支付回调URL。URL实现的功能:接收用户扫码后微信支付系统回调的productid和openid;调用微信支付统一下单API请求下单,获取交易会话标识(prepay_id),再将prepay_id返回给微信支付系统。
https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_4
现有的支付回调只能返回成功/失败,而这个流程要求在成功时返回签名的prepay_id。
这个PR增加了一个回调,方法签名为:
function(string $productId, string $openId, Collection $collection): string; (throws \Exception)
$collection为未来扩展保留,若成功返回,则构建响应XML。若抛出异常,则返回错误结果。

@overtrue overtrue merged commit 22b876c into w7corp:master Feb 14, 2017
@acgrid acgrid deleted the add-scan-notify branch February 15, 2017 10:02
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

Successfully merging this pull request may close these issues.

2 participants