|
|
@ -101,16 +101,16 @@ class PaymentService extends AbstractService
|
|
|
|
$order->payed_at = date('Y-m-d H:i:s');
|
|
|
|
$order->payed_at = date('Y-m-d H:i:s');
|
|
|
|
$order->exchange_rate = $params['exchange_rate'] ?: 0;
|
|
|
|
$order->exchange_rate = $params['exchange_rate'] ?: 0;
|
|
|
|
$order->cny_amount = $params['cny_amount'] ?: 0;
|
|
|
|
$order->cny_amount = $params['cny_amount'] ?: 0;
|
|
|
|
$order->save();
|
|
|
|
if (!$order->save()) {
|
|
|
|
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') {
|
|
|
|
Log::info('notifyToOut url:' . $order->notify_url, 'omipay');
|
|
|
|
return 'NOTIFY FAIL';
|
|
|
|
$result = Notification::post($order->notify_url, $this->buildNotifyParams($order, $app));
|
|
|
|
}
|
|
|
|
if ($result != 'SUCCESS') {
|
|
|
|
return 'SUCCESS';
|
|
|
|
return 'NOTIFY FAIL';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 'UPDATE FAIL';
|
|
|
|
return 'SUCCESS';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected function buildNotifyParams(Order $roder, App $app) {
|
|
|
|
protected function buildNotifyParams(Order $roder, App $app) {
|
|
|
|