|
@@ -41,15 +41,15 @@ class WithdrawController extends BaseController
|
|
|
case 'create_batch_order':
|
|
|
if ($data['return_code'] == 'SUCCESS') {
|
|
|
$info = WithdrawService::init()::decode($data['resoult']);
|
|
|
- @file_put_contents('notify.txt', $data['type'] . json_encode($info) . PHP_EOL, FILE_APPEND);
|
|
|
+ @file_put_contents('notify.txt', json_encode($info) . PHP_EOL, FILE_APPEND);
|
|
|
$list = $extract_service->getList(['trade_number' => $info['trade_number'], 'status' => 2]);
|
|
|
- if ($info['data']['result_code'] != 'SUCCESS') {
|
|
|
+ if ($info['data'][0]['result_code'] != 'SUCCESS') {
|
|
|
foreach ($list as $v) {
|
|
|
$extract_service->update($v['id'], ['status' => 0, 'mark' => '业务处理失败']);
|
|
|
}
|
|
|
} else {
|
|
|
foreach ($list as $v) {
|
|
|
- $extract_service->update($v['id'], ['enterprise_order_id' => $info['data']['enterprise_order_id']]);
|
|
|
+ $extract_service->update($v['id'], ['enterprise_order_id' => $info['data'][0]['enterprise_order_id']]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -57,7 +57,7 @@ class WithdrawController extends BaseController
|
|
|
case 'refuse_order':
|
|
|
if ($data['return_code'] == 'SUCCESS') {
|
|
|
$info = WithdrawService::init()::decode($data['resoult']);
|
|
|
- @file_put_contents('notify.txt', $data['type'] . json_encode($info) . PHP_EOL, FILE_APPEND);
|
|
|
+ @file_put_contents('notify.txt', json_encode($info) . PHP_EOL, FILE_APPEND);
|
|
|
$list = $extract_service->getList(['enterprise_order_id' => $info['enterprise_order_id'], 'status' => 2]);
|
|
|
foreach ($list as $v) {
|
|
|
$extract_service->refuse($v['id'], $info['remarks']);
|
|
@@ -67,7 +67,7 @@ class WithdrawController extends BaseController
|
|
|
case 'payment_resout':
|
|
|
if ($data['return_code'] == 'SUCCESS') {
|
|
|
$info = WithdrawService::init()::decode($data['resoult']);
|
|
|
- @file_put_contents('notify.txt', $data['type'] . json_encode($info) . PHP_EOL, FILE_APPEND);
|
|
|
+ @file_put_contents('notify.txt', json_encode($info) . PHP_EOL, FILE_APPEND);
|
|
|
$id = explode('_', $info['request_no'])[1] ?? 0;
|
|
|
if ($id) {
|
|
|
$list = $extract_service->getList(['id' => $id, 'status' => 2]);
|