1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 12:42:36 +01:00

Update RotessaPaymentDriver.php

Set payment_method_id to use ACSS. Updates meta data.

Signed-off-by: Kendall Arneaud <kendall.arneaud@gmail.com>
This commit is contained in:
Kendall Arneaud 2024-07-31 18:27:25 -04:00 committed by GitHub
parent 34759822f5
commit cc176f6d7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -248,9 +248,11 @@ class RotessaPaymentDriver extends BaseDriver
$data = array_filter($customer->resolve());
}
$payment_method_id = Arr::has($data,'address.postal_code') && ((int) $data['address']['postal_code'])? GatewayType::BANK_TRANSFER: GatewayType::ACSS;
// $payment_method_id = Arr::has($data,'address.postal_code') && ((int) $data['address']['postal_code'])? GatewayType::BANK_TRANSFER: GatewayType::ACSS;
// TODO: Check/ Validate postal code between USA vs CAN
$payment_method_id = GatewayType::ACSS;
$gateway_token = $this->storeGatewayToken( [
'payment_meta' => $data + ['brand' => 'Rotessa'],
'payment_meta' => $data + ['brand' => 'Rotessa', 'last4' => $data['bank_name'], 'type' => $data['bank_account_type'] ],
'token' => encrypt(join(".", Arr::only($data, 'id','custom_identifier'))),
'payment_method_id' => $payment_method_id ,
], ['gateway_customer_reference' =>