orderService->onlineCompleted($global_order_id); $this->separateAccountsService->orderOnlineCompleted($global_order_id); Db::commit(); return [ "status" => 200, "code" => 0, "result" => [], "message" => '调用成功' ]; } catch (\Exception $e) { Db::rollBack(); $this->log->event(LogLabel::ONLINE_COMPLETE_LOG, ['exception' => $e->getMessage()]); return [ "status" => 200, "code" =>ErrorCode::SEPARATE_ACCOUNTS_ERROR, "result" => [], "message" => ErrorCode::getMessage(ErrorCode::SEPARATE_ACCOUNTS_ERROR) ]; } } /** * 线上订单退款 * 申请退款 state = 8 * 退款成功 state = 9 */ public function onlineRefund($global_order_id){ Db::beginTransaction(); try{ return [ "status" => 200, "code" => 0, "result" => $this->orderService->onlineRefund($global_order_id), // 'result' => $global_order_id, "message" => '退款成功' ]; } catch (\Exception $e){ Db::rollBack(); return [ "status" => 200, "code" => ErrorCode::ORDER_FAILURE, "result" => [], "message" => $e->getMessage() ]; } } }