Add transaction reference to eWay response
This commit is contained in:
parent
36d957f768
commit
44719ac996
2 changed files with 4 additions and 8 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue