|
|
@ -96,6 +96,9 @@ class PaymentService extends AbstractService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$order = Order::where('order_no', $params['out_order_no'])->where('status', Order::STATUS_WAIT_PAY)->first();
|
|
|
|
$order = Order::where('order_no', $params['out_order_no'])->where('status', Order::STATUS_WAIT_PAY)->first();
|
|
|
|
|
|
|
|
if (!$order) {
|
|
|
|
|
|
|
|
return 'ORDER FAIL';
|
|
|
|
|
|
|
|
}
|
|
|
|
$app = App::where('app_id', $order->app_id)->first();
|
|
|
|
$app = App::where('app_id', $order->app_id)->first();
|
|
|
|
$order->status = Order::STATUS_PAYED;
|
|
|
|
$order->status = Order::STATUS_PAYED;
|
|
|
|
$order->payed_at = date('Y-m-d H:i:s');
|
|
|
|
$order->payed_at = date('Y-m-d H:i:s');
|
|
|
@ -104,7 +107,7 @@ class PaymentService extends AbstractService
|
|
|
|
if (!$order->save()) {
|
|
|
|
if (!$order->save()) {
|
|
|
|
return 'NOTIFY FAIL';
|
|
|
|
return 'NOTIFY FAIL';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Log::info('notifyToOut url:' . $order->notify_url, 'omipay');
|
|
|
|
Log::info('notifyToOut url:' . $order->notify_url, 'omipay');
|
|
|
|
$result = Notification::post($order->notify_url, $this->buildNotifyParams($order, $app));
|
|
|
|
$result = Notification::post($order->notify_url, $this->buildNotifyParams($order, $app));
|
|
|
|
if ($result != 'SUCCESS') {
|
|
|
|
if ($result != 'SUCCESS') {
|
|
|
|