diff --git a/app/PaymentDrivers/Eway/CreditCard.php b/app/PaymentDrivers/Eway/CreditCard.php index b79c6a2afc13..5f7d16e18012 100644 --- a/app/PaymentDrivers/Eway/CreditCard.php +++ b/app/PaymentDrivers/Eway/CreditCard.php @@ -160,7 +160,6 @@ class CreditCard 'TotalAmount' => $this->convertAmountForEway(), 'CurrencyCode' => $this->eway_driver->client->currency()->code, 'InvoiceNumber' => $invoice_numbers, - 'InvoiceReference' => $description, ], 'TransactionType' => \Eway\Rapid\Enum\TransactionType::PURCHASE, 'SecuredCardData' => $request->input('securefieldcode'), @@ -168,19 +167,17 @@ class CreditCard $response = $this->eway_driver->init()->eway->createTransaction(\Eway\Rapid\Enum\ApiMethod::DIRECT, $transaction); + $this->logResponse($response); + $response_status = ErrorCode::getStatus($response->ResponseMessage); if(!$response_status['success']){ - $this->logResponse($response, false); - $this->eway_driver->sendFailureMail($response_status['message']); throw new PaymentFailed($response_status['message'], 400); } - $this->logResponse($response, true); - $payment = $this->storePayment($response); return redirect()->route('client.payments.show', ['payment' => $this->encodePrimaryKey($payment->id)]);