|
@@ -19,28 +19,24 @@ class RefillCallBack implements refill\IRefillCallBack
|
|
|
private function sign($params)
|
|
|
{
|
|
|
$key = config::APP_KEY;
|
|
|
- $user_name = config::USER_NAME;
|
|
|
- $content = "{$user_name}{$params['sys_order_id']}{$params['user_order_id']}{$key}";
|
|
|
+ $content = "{$params['username']}{$params['orderNumber']}{$params['number']}{$params['money']}[{$params['status']}]{$params['endTime']}{$key}";
|
|
|
return md5($content);
|
|
|
}
|
|
|
|
|
|
public function notify($params)
|
|
|
{
|
|
|
$status = intval($params['status']);
|
|
|
- $order_sn = $params['user_order_id'];
|
|
|
+ $order_sn = $params['orderNumber'];
|
|
|
$order_info = Model('vr_order')->getOrderInfoForNotify(['order_sn' => $order_sn]);
|
|
|
if (empty($order_info)) {
|
|
|
return [false, false, false, false, ''];
|
|
|
}
|
|
|
$order_id = $order_info['order_id'];
|
|
|
|
|
|
- if ($status === 200) {
|
|
|
- $official_sn = strtolower($params['official_order_id']) == 'null' ? '' : $params['official_order_id'];
|
|
|
- $data['official_sn'] = $official_sn;
|
|
|
- Model('refill_order')->edit($order_id, $data);
|
|
|
- return [$order_id, true, false, true, $official_sn];
|
|
|
+ if ($status === 5) {
|
|
|
+ return [$order_id, true, false, true, ''];
|
|
|
}
|
|
|
- elseif ($status === 202) {
|
|
|
+ elseif ($status === 6) {
|
|
|
return [$order_id, false, true, true, ''];
|
|
|
}
|
|
|
else {
|