@chenwei123
2016-06-17T07:56:15.000000Z
字数 2060
阅读 493
益安
用户进行付款
| Method | Resource URL |
|---|---|
| PUT | /pay/pay_for_order/ |
| Name | Description | Required | Default |
|---|---|---|---|
| order_no | 订单号 | Yes | |
| channel | 支付方式 | Yes |
wx(微信支付)、alipay(支付宝支付)
| Name | Description | Required | Default |
|---|---|---|---|
| Authorization | Token 7309fabd207c22e0a00eada158989b89ffe839ef | Yes |
*Authorization的值为登录成功后返回值
{"order_no":12134676899915430002,"channel":"alipay",}
curl -X PUT -H 'Authorization: Token 706a87288233ea2427cddb8a1bbce29369ac5073' -d 'order_no=12134676899915430002&channel=alipay' http://127.0.0.1:8000/pay/pay_for_order/
第一种情况{"status":-4,"message":"无效的支付通道"}第二种情况{"status":-4,"message":"支付请求失败"}
{"status": 0,"message": "","ch": {"order_no": "12134676899915430002","extra": {},"app": "app_GuHu9Of9KaTG5GiT","livemode": true,"currency": "cny","time_settle": null,"time_expire": 1466236251,"id": "ch_WrHW58Ki5unLCSuf54OuHKCS","subject": 1,"failure_msg": null,"channel": "alipay","metadata": {"order_id": 1,"buyer": "15201052252","names": "collection的使用","order_no": "12134676899915430002","courses": "1"},"body": "12134676899915430002","credential": {"alipay": {"orderInfo": "service=\"mobile.securitypay.pay\"&_input_charset=\"utf-8\"¬ify_url=\"https%3A%2F%2Fapi.pingxx.com%2Fnotify%2Fcharges%2Fch_WrHW58Ki5unLCSuf54OuHKCS\"&partner=\"2088021773101301\"&out_trade_no=\"12134676899915430002\"&subject=\"1\"&body=\"12134676899915430002\"&total_fee=\"99.00\"&payment_type=\"1\"&seller_id=\"2088021773101301\"&it_b_pay=\"2016-06-18 15:50:51\"&sign=\"jMPi1%2BktjpQbQloc%2F8SkKI0Lie705yZLgKD7SNuEUghhCZj7iTzLfoMXtmqSSvZ8XRWKDr%2FGrS7xLenBNsFlqeo%2BLKqCOYxFmtOZRHlNhFrhebowM9IiJGQvlXJWr6S9dwtmRmWl455DQfyO%2FP48Frny0vjTlI%2B7YRKPyyFZPx0%3D\"&sign_type=\"RSA\""},"object": "credential"},"client_ip": "127.0.0.1","description": null,"amount_refunded": 0,"refunded": false,"object": "charge","paid": false,"amount_settle": 9900,"time_paid": null,"failure_code": null,"refunds": {"url": "/v1/charges/ch_WrHW58Ki5unLCSuf54OuHKCS/refunds","has_more": false,"object": "list","data": []},"created": 1466149851,"transaction_no": null,"amount": 9900}}