public function delete($id)
 {
     try {
         PaymentModel::find($id)->delete();
         $alert['msg'] = 'This payment has been deleted successfully';
         $alert['type'] = 'success';
     } catch (\Exception $ex) {
         $alert['msg'] = 'This payment  focus has been already used';
         $alert['type'] = 'danger';
     }
     return Redirect::route('admin.payment')->with('alert', $alert);
 }
示例#2
0
 protected function createTypedOperation(Payment $payment, $type)
 {
     if (!$payment->loaded()) {
         throw new \InvalidArgumentException("The payment must be a persistent object.");
     }
     $operation = new PaymentOperation($this->pixie);
     $operation->payment_id = $payment->id();
     $this->fillPaymentOperationWithStandardValues($operation);
     $this->fillPaymentOperationWithOrderData($operation, $payment->order);
     $operation->setTransactionType($type);
     $operation->save();
     return $operation;
 }
 public function quote($peopleId, $projectId, $quoteId)
 {
     if ($alert = Session::get('alert')) {
         $param['alert'] = $alert;
     }
     $param['pageNo'] = 61;
     $user_id = Session::get('user_id');
     $param['member'] = MembersModel::find($user_id);
     $param['people'] = PeopleModel::find($peopleId);
     $param['project'] = ProjectModel::find($projectId);
     $param['quote'] = QuoteModel::whereRaw('projectId = ? ', array($projectId))->get();
     $param['members'] = MembersModel::whereRaw(true)->orderBy('first_name', 'asc')->get();
     $param['payment'] = PaymentModel::whereRaw(true)->orderBy('payment', 'asc')->get();
     $param['quoteItem'] = QuoteModel::find($quoteId);
     return View::make('admin.contact.quote')->with($param);
 }