> POST-表单格式 回调地址:订单提交时参数中传的回调的地址
### [](#%E8%AF%B7%E6%B1%82%E4%BD%93request-body-5)请求体(Request Body)
| 参数名称 | 数据类型 | 示例 | 不为空 | 描述 |
| --- | --- | --- | --- | --- |
| userid | int | 10001 | true | 商户ID |
| order\_number | CZH000000000 | string | | true |
| out\_trade\_num | string | ABC2222 | true | 商户订单号 |
| otime | number | 1652403339 | true | 成功/失败时间,10位时间戳 |
| state | number | 1 | true | 充值状态;-1取消, 0充值中, 1充值成功 ,2充值失败,3部分成功(-1,2做失败处理;1做成功处理;3做部分成功处理) |
| mobile | string | 18866667777 | true | 充值手机号 |
| remark | string | 充值成功 | true | 备注信息 |
| charge\_amount | float | 100 | true | 充值成功面额 |
| voucher | string | [http://www.abc.com/xxx](https://gitee.com/link?target=http%3A%2F%2Fwww.abc.com%2Fxxx) | true | 凭证 |
| charge\_kami | string | 3etydgd45gf11 | true | 卡密/流水号 |
| sign | string | DS9V0606ITN8GLJM5M4L4DYWQX0VDMVM | true | 签名字符串,用于验签,以保证回调可靠性。 |
签名规则见:签名说明
注:所有参数都要参与签名,请获取所有参数签名,而不是获取现有参数表中的字段签名,以免回调参数增加时导致签名不通过 |
| … | \* | \* | \* | 更多参数 |
### [](#%E5%93%8D%E5%BA%94%E4%BD%93-5)响应体
● 收到回调响应文本“success”,如果不响应系统每隔1分钟会再次发起回调,最多回调5次。
~~~
success
~~~
~~~
php版回调验签示例:
$apikey="你的秘钥";
$data = $\_POST;//接收所有post的数据
unset($data\['sign'\]);//删除掉sign字段
ksort($data);//排序
$sign\_str = urldecode(http\_build\_query($data)) . '&apikey=' . $apikey;//获得签名原串
$mysign=strtoupper(md5($sign\_str));//签名
if($mysign==$\_POST\['sign'\]){
//签名正确
}
~~~