Commit c9108b84cb1381143bb6d6bd1563dad5325c19e6
Committed by
GitHub
Exists in
master
Merge pull request #102 from qinwenshi/master
Corrected example for sandbox mode
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
README.md
... | ... | @@ -55,12 +55,13 @@ WxPay.extra_rest_client_options = {timeout: 2, open_timeout: 3} |
55 | 55 | If you need to use sandbox mode. |
56 | 56 | |
57 | 57 | ```ruby |
58 | -result = WxPay::Service.get_sandbox_signkey('YOUR_MCH_ID') | |
59 | -WxPay.key = result['sandbox_signkey'] | |
60 | 58 | WxPay.appid = 'YOUR_APPID' |
61 | 59 | WxPay.mch_id = 'YOUR_MCH_ID' |
62 | 60 | WxPay.debug_mode = true # default is `true` |
63 | 61 | WxPay.sandbox_mode = true # default is `false` |
62 | +result = WxPay::Service.get_sandbox_signkey | |
63 | +WxPay.key = result['sandbox_signkey'] | |
64 | + | |
64 | 65 | ``` |
65 | 66 | |
66 | 67 | Note: You should create your APIKEY (Link to [微信商户平台](https://pay.weixin.qq.com/index.php/home/login)) first if you haven't, and pay attention that **the length of the APIKEY should be 32**. | ... | ... |