|
@@ -5,8 +5,6 @@ namespace refill\event;
|
|
|
use refill\order;
|
|
|
use refill\util;
|
|
|
use mtopcard;
|
|
|
-use Log;
|
|
|
-
|
|
|
|
|
|
# 规避相同手机卡号撞单问题解
|
|
|
class card_crash implements IEventRefill
|
|
@@ -34,16 +32,13 @@ class card_crash implements IEventRefill
|
|
|
|
|
|
public function onBeforeSubmit(order $order)
|
|
|
{
|
|
|
- Log::record("card_crash onBeforeSubmit 1",Log::DEBUG);
|
|
|
if(!$order->is_phone()) {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- Log::record("card_crash onBeforeSubmit 2",Log::DEBUG);
|
|
|
$card_no = $order->card_no();
|
|
|
$ret = $this->can_submit($card_no);
|
|
|
|
|
|
- Log::record("card_crash onBeforeSubmit 3",Log::DEBUG);
|
|
|
if(!$ret)
|
|
|
{
|
|
|
$mchid = $order->mchid();
|
|
@@ -60,25 +55,18 @@ class card_crash implements IEventRefill
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Log::record("card_crash onBeforeSubmit 3",Log::DEBUG);
|
|
|
return true;
|
|
|
}
|
|
|
public function onSubmit(order $order)
|
|
|
{
|
|
|
- Log::record("card_crash onSubmit 1",Log::DEBUG);
|
|
|
-
|
|
|
if(!$order->is_phone()) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- Log::record("card_crash onSubmit 2",Log::DEBUG);
|
|
|
-
|
|
|
$card_no = $order->card_no();
|
|
|
$oid = $order->unique_id();
|
|
|
|
|
|
$this->submit($card_no,$oid);
|
|
|
-
|
|
|
- Log::record("card_crash onSubmit 3",Log::DEBUG);
|
|
|
}
|
|
|
|
|
|
|