|
@@ -7,6 +7,7 @@ require_once(BASE_HELPER_RAPI_PATH . '/yunling/config.php');
|
|
|
|
|
|
|
|
|
use refill;
|
|
|
+use Log;
|
|
|
|
|
|
class RefillCallBack implements refill\IRefillCallBack
|
|
|
{
|
|
@@ -31,6 +32,8 @@ class RefillCallBack implements refill\IRefillCallBack
|
|
|
|
|
|
public function notify($params)
|
|
|
{
|
|
|
+ Log::record("notify params:" . json_encode($params),Log::DEBUG);
|
|
|
+
|
|
|
$status = intval($params['resultno']);
|
|
|
$order_sn = $params['sporderid'];
|
|
|
$order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
|
|
@@ -38,7 +41,13 @@ class RefillCallBack implements refill\IRefillCallBack
|
|
|
return [false, false, false,false];
|
|
|
}
|
|
|
$order_id = $order_info['order_id'];
|
|
|
- $data['official_sn'] = strtolower($params['supnumber']) == 'null' ? '' : $params['supnumber'];
|
|
|
+
|
|
|
+ if(empty($params['supnumber'])) {
|
|
|
+ $data['official_sn'] = '';
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $data['official_sn'] = strtolower($params['supnumber']) == 'null' ? '' : $params['supnumber'];
|
|
|
+ }
|
|
|
|
|
|
if ($status === 1) {
|
|
|
Model('refill_order')->edit($order_id, $data);
|