public function initExistsPaid() { $this->existsPaid = PaymentCloud::whereCustomerId($this->agbis_id)->payed()->exists(); return $this->existsPaid; }
/** * процессинг по запросу fail * помечает заказ ожидающую транзакцию как не успешную */ private function processPayFail() { $params = $this->parameters(); $pay = PaymentCloud::whereCustomerId($params['customer_id'])->whereOrderId($params['order_id'])->wherePaymentId($params['payment_id'])->whereWaiting(1)->first(); if ($pay) { $pay->failed = 1; $pay->request = $params['request']; $pay->save(); } return Redirect::to('/account')->withErrors(['payment' => trans('main.Order payment is failed')]); }
/** * процессинг по запросу fail * помечает заказ ожидающую транзакцию как не успешную */ private function processPayFail() { $pay = PaymentCloud::whereCustomerId($this->params['customer_id'])->wherePaymentId($this->params['payment_id'])->whereWaiting(1)->first(); if ($pay) { $pay->failed = 1; $pay->request = $this->params['request']; $pay->save(); } $this->responseSuccess(); }