diff --git a/app/Service/PaymentService.php b/app/Service/PaymentService.php index dc8fab6..3ab74dd 100644 --- a/app/Service/PaymentService.php +++ b/app/Service/PaymentService.php @@ -101,16 +101,16 @@ class PaymentService extends AbstractService $order->payed_at = date('Y-m-d H:i:s'); $order->exchange_rate = $params['exchange_rate'] ?: 0; $order->cny_amount = $params['cny_amount'] ?: 0; - $order->save(); - if ($order->save()) { - Log::info('notifyToOut url:' . $order->notify_url, 'omipay'); - $result = Notification::post($order->notify_url, $this->buildNotifyParams($order, $app)); - if ($result != 'SUCCESS') { - return 'NOTIFY FAIL'; - } - return 'SUCCESS'; + if (!$order->save()) { + return 'NOTIFY FAIL'; + } + + Log::info('notifyToOut url:' . $order->notify_url, 'omipay'); + $result = Notification::post($order->notify_url, $this->buildNotifyParams($order, $app)); + if ($result != 'SUCCESS') { + return 'NOTIFY FAIL'; } - return 'UPDATE FAIL'; + return 'SUCCESS'; } protected function buildNotifyParams(Order $roder, App $app) { diff --git a/composer.zip b/composer.zip deleted file mode 100644 index ac623f6..0000000 Binary files a/composer.zip and /dev/null differ