|
@@ -26,23 +26,27 @@ class RefillCallBack implements refill\IRefillCallBack
|
|
|
|
|
|
public function notify($params)
|
|
|
{
|
|
|
- $extractOfficialSn = function ($officialSnStr) {
|
|
|
+ $extractOfficialSn = function ($sms)
|
|
|
+ {
|
|
|
$officialSn = '';
|
|
|
|
|
|
- $matches = [];
|
|
|
- if (preg_match_all("/(\d+)/", $officialSnStr, $matches)) {
|
|
|
- foreach ($matches[1] as $item) {
|
|
|
+ if (preg_match_all("/(\d+)/", $sms, $matches))
|
|
|
+ {
|
|
|
+ foreach ($matches[1] as $item)
|
|
|
+ {
|
|
|
if (strlen($officialSn) < strlen($item)) {
|
|
|
$officialSn = $item;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return $officialSn;
|
|
|
};
|
|
|
|
|
|
$status = intval($params['status']);
|
|
|
$order_sn = $params['user_order_id'];
|
|
|
$order_info = Model('vr_order')->getOrderInfoForNotify(['order_sn' => $order_sn]);
|
|
|
+
|
|
|
if (empty($order_info)) {
|
|
|
return [false, false, false, false, ''];
|
|
|
}
|