Appearance
Create a Pay-In Order
- Requests use http-form-post encoding
application/x-www-form-urlencoded - Responses use JSON encoding
application/json - Gateway : https://www.lg-pay.com/api/order/create
The Request paramters :
| Field | Meaning | Type | Required |
|---|---|---|---|
| app_id | Your Merchant ID | String | True |
| trade_type | Trade code, please ask the service man | String | True |
| order_sn | Order number, must be unique | String | True |
| money | This field needs to multiply 100 and remove the float part. eg. you need to receive 50.5, this field should be 5050 | Integer | True |
| notify_url | When this order is paid, a notify message will be sent to your server, leave the url here | String | True |
| ip | Your client's ip address, if you don't have, use 0.0.0.0 instead | String | False |
| remark | If you upload this field, it will be send back to you in the callback paramters | String | False |
| sign | md5_hash, refer to: Signature | String | True |
The Response
json
{
"status":1, // 1 means request success , 0 means request fail
"msg":"ok", // when a request is failed, please read msg to find out why
"data":{
"type":"url",
"pay_url":"http://..." // if staus == 1, you will get a pay url, help your client open it, they can do the payment
}
}