Skip to content
New issue

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

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

Already on GitHub? # to your account

關於微信香港錢包的問題 #27

Closed
riseno opened this issue Nov 9, 2017 · 17 comments
Closed

關於微信香港錢包的問題 #27

riseno opened this issue Nov 9, 2017 · 17 comments

Comments

@riseno
Copy link
Contributor

riseno commented Nov 9, 2017

问题描述

我是一家做 multi-payment gateway 公司的產品負責人,現在我的項目要支持微信香港錢包,但全部的 endpoint 都跟國內錢包的不一樣。我也想 contribute 到這裡來,但我看到 namespace 已經用了 Wechat 做國內錢包。

所以我想問的是,對於這個狀況會有什麼建議嗎?

@yansongda
Copy link
Owner

感谢您的支持!

请问香港那边的微信开发文档在哪里可以看到?

@riseno
Copy link
Contributor Author

riseno commented Nov 10, 2017

現在來說,都沒有公開的,都是微信內部發 doc 過來。而且現在只出了刷卡支付,掃碼和公眾號的也沒那麼快可以有。

WeChat Pay HK 刷卡支付商户开发者文档.doc.zip

你看看吧,我項目已經把這塊接入了。但可以吐糟的是 response data 跟國內錢包有點不一樣.

@riseno
Copy link
Contributor Author

riseno commented Nov 13, 2017

@yansongda 對於這個有想法嗎?寫我是寫好了,就是看您對 namespace convention 要怎麼處理,然後我再發 PR

@yansongda
Copy link
Owner

刚刚初步看了下文档,发现其实应该就只有 endpoint 不一样,其它应该都差不多的吧?不知您怎么看。

如果真是这样,其实就很好处理了,给多一个 HKEndpoint,调用的时候默认是大陆的,只有参数中有 hk 标识时才选用 HKEndpoint。

不知您怎么看?

@riseno
Copy link
Contributor Author

riseno commented Nov 15, 2017

您說的是類似這樣嗎?

$config = [
    'wechat' => [
        'wallet_region' => 'hk', // default cn.
        'app_id' => '',
        'mch_id' => '',
        // 'sub_mch_id' => '',
        'key' => '',
        'cert_client' => '',
        'cert_key' => '',
        'notify_url' => '',
    ],
];

$pay =  new Pay($config);

@yansongda
Copy link
Owner

Yes, something like that~

不过建议 wallet_region 参数可选,如果不设置,默认为 cn。

@riseno
Copy link
Contributor Author

riseno commented Nov 15, 2017

行,我還得想一下 hk wallet 的 endpoints 要怎麼處理比較好。

@yansongda
Copy link
Owner

merged!

测试一段儿时间后将发布新版本。

感谢您的支持!

@riseno
Copy link
Contributor Author

riseno commented Nov 21, 2017

剛剛那個PR沒香港錢包,過一兩天我會把香港錢包的支持再發 PR

@yansongda
Copy link
Owner

v2.0.0 版本已经增加了 香港 region。目前已经开发完成,版本号为 v2.0.0-beta,您可以试用。

感谢您的支持!

@riseno
Copy link
Contributor Author

riseno commented Dec 25, 2017

如果我沒看錯的話,那應該只是大陸錢包在東南亞的endpoint吧。

香港錢包的 endpoint 是 https://mchapi.wechatpay.com.hk/cgi-bin

pos 的 path 是 ia_mch_qr_auth.cgi

@yansongda
Copy link
Owner

额,我看您提交的 PR 并未包含这些,您3楼给的那个文档也未包含。请问有具体的文档吗?

@yansongda
Copy link
Owner

yansongda commented Dec 26, 2017

我未使用过您说的 香港钱包,不过现在从APPStore下载的应该都是一个微信吧,只是语言不同而已。请问您说的 香港钱包 具体使用在哪里?

wechatpay.com.hk 也是访问不了的。

@riseno
Copy link
Contributor Author

riseno commented Dec 26, 2017

三樓文檔有寫

screen shot 2017-12-26 at 3 05 49 pm

而香港錢包可以在微信這裡設置,

whatsapp image 2017-12-26 at 3 07 23 pm

至於 wechatpay.com.hk 只能用子域名訪問

@yansongda
Copy link
Owner

请问目前使用 香港钱包 的业务场景多吗?使用频率多吗?

@riseno
Copy link
Contributor Author

riseno commented Dec 27, 2017

暫時只有 pos 模式,基本場景跟大陸錢包差不多

@riseno
Copy link
Contributor Author

riseno commented Apr 12, 2019

I'm closing it coz wechat HK wallet have combined into CN wallet's API.

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

No branches or pull requests

2 participants