|
@@ -215,13 +215,13 @@ class WinfailLogic
|
|
|
$AdapterObj = $this->getAdapterObj($game_code);
|
|
$AdapterObj = $this->getAdapterObj($game_code);
|
|
|
$RefClass = new \ReflectionClass($AdapterObj);
|
|
$RefClass = new \ReflectionClass($AdapterObj);
|
|
|
|
|
|
|
|
- $fun1 = $orderInfo->odds_code;
|
|
|
|
|
- $fun2 = $orderInfo->p_code;
|
|
|
|
|
-
|
|
|
|
|
$result = json_decode($orderInfo->single_result, true);
|
|
$result = json_decode($orderInfo->single_result, true);
|
|
|
$winorfalsedef = ['result' => 2, 'matchResult' => 'noRuleOrError'];
|
|
$winorfalsedef = ['result' => 2, 'matchResult' => 'noRuleOrError'];
|
|
|
|
|
|
|
|
foreach ($matchArray as $matchModel) {
|
|
foreach ($matchArray as $matchModel) {
|
|
|
|
|
+ $fun1 = $matchModel->odds_code;
|
|
|
|
|
+ $fun2 = $matchModel->p_code;
|
|
|
|
|
+
|
|
|
$mid = $matchModel->id;
|
|
$mid = $matchModel->id;
|
|
|
try {
|
|
try {
|
|
|
if ($RefClass->hasMethod($fun1)) {
|
|
if ($RefClass->hasMethod($fun1)) {
|
|
@@ -229,10 +229,11 @@ class WinfailLogic
|
|
|
} elseif ($RefClass->hasMethod($fun2)) {
|
|
} elseif ($RefClass->hasMethod($fun2)) {
|
|
|
$winorfalse = $AdapterObj->$fun2($matchModel, $result, []);
|
|
$winorfalse = $AdapterObj->$fun2($matchModel, $result, []);
|
|
|
}
|
|
}
|
|
|
- } catch (\Exception $e) {
|
|
|
|
|
|
|
|
|
|
|
|
+ } catch (\Exception $e) {
|
|
|
|
|
+ echo 'excetption: ' . print_r([$order_id, $e->getMessage(), $e->getFile(), $e->getLine()], true) . "\n";
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ echo 'winforret: ' . print_r($winorfalse, true) . "\n";
|
|
|
if (!isset($winorfalse['result']) || !isset($winorfalse['matchResult']) || !in_array($winorfalse['result'], [-1, 1, 2, 3, 4])) {
|
|
if (!isset($winorfalse['result']) || !isset($winorfalse['matchResult']) || !in_array($winorfalse['result'], [-1, 1, 2, 3, 4])) {
|
|
|
$winorfalse = $winorfalsedef;
|
|
$winorfalse = $winorfalsedef;
|
|
|
}
|
|
}
|