diff --git a/app/PaymentDrivers/Eway/Token.php b/app/PaymentDrivers/Eway/Token.php index 63b83b9c4840..b49bf12a1439 100644 --- a/app/PaymentDrivers/Eway/Token.php +++ b/app/PaymentDrivers/Eway/Token.php @@ -43,6 +43,8 @@ class Token $amount = array_sum(array_column($payment_hash->invoices(), 'amount')) + $payment_hash->fee_total; + $this->eway_driver->payment_hash = $payment_hash; + $transaction = [ 'Customer' => [ 'TokenCustomerID' => $cgt->token, @@ -74,10 +76,10 @@ class Token $data = [ 'gateway_type_id' => GatewayType::CREDIT_CARD, 'payment_type' => PaymentType::CREDIT_CARD_OTHER, - 'transaction_reference' => $response->Customer->Reference, + 'transaction_reference' => $response->TransactionID, 'amount' => $amount, ]; - + $payment = $this->eway_driver->createPayment($data); $payment->meta = $cgt->meta; $payment->save(); diff --git a/app/PaymentDrivers/EwayPaymentDriver.php b/app/PaymentDrivers/EwayPaymentDriver.php index 65559abd41dc..4c25496c858a 100644 --- a/app/PaymentDrivers/EwayPaymentDriver.php +++ b/app/PaymentDrivers/EwayPaymentDriver.php @@ -167,12 +167,6 @@ class EwayPaymentDriver extends BaseDriver $fields[] = ['name' => 'client_name', 'label' => ctrans('texts.client_name'), 'type' => 'text', 'validation' => 'required']; } - // if ($this->company_gateway->require_contact_name) { - // } - - // if ($this->company_gateway->require_contact_email) { - // } - if ($this->company_gateway->require_client_phone) { $fields[] = ['name' => 'client_phone', 'label' => ctrans('texts.client_phone'), 'type' => 'tel', 'validation' => 'required']; }