wx.requestPayment(OBJECT) in the Mini Program to start WeChat Pay. Wechat Official Docwith Promise style call: Supported
Mini Program plugin: Not supported
Wechat Windows version: Supported
Wechat Mac version: Supported
| parameter name | required | type of data | description |
|---|---|---|---|
| timeStamp | Yes | string | timestamp, get it from metadata.wechatpay.timeStamp returned by WebPay Create |
| nonceStr | Yes | string | random string, get it from metadata.wechatpay.nonceStr returned by WebPay Create |
| package | Yes | string | extension order details, get it from metadata.wechatpay.pkg returned by WebPay Create |
| signType | Yes | string | Signature Method, get it from metadata.wechatpay.signType returned by WebPay Create |
| paySign | Yes | string | Signature, get it from metadata.wechatpay.paySign returned by WebPay Create |
| success | No | function | Callback function for successful interface call |
| fail | No | function | Callback function for interface call failure |
| complete | No | function | The callback function for the end of the interface call (will be executed if the call succeeds or fails) |
| Callback Type | errMsg | description |
|---|---|---|
| success | requestPayment:ok | Calling payment successful |
| fail | requestPayment:fail cancel | User cancels payment |
| fail | requestPayment:fail (detail message) | Failed to call payment. The detail message is the specific failure reason returned by the backend |