Update PaymentMethod.php

Updated to use ACSS for CAN clients only.

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

View File

@ -60,7 +60,10 @@ class PaymentMethod implements MethodInterface
'id' => null
] )->all();
$data['gateway'] = $this->rotessa;
$data['gateway_type_id'] = $data['client']->country->iso_3166_2 == 'US' ? GatewayType::BANK_TRANSFER : ( $data['client']->country->iso_3166_2 == 'CA' ? GatewayType::ACSS : (int) request('method'));
// Set gateway type according to client country
// $data['gateway_type_id'] = $data['client']->country->iso_3166_2 == 'US' ? GatewayType::BANK_TRANSFER : ( $data['client']->country->iso_3166_2 == 'CA' ? GatewayType::ACSS : (int) request('method'));
// TODO: detect GatewayType based on client country USA vs CAN
$data['gateway_type_id'] = GatewayType::ACSS ;
$data['account'] = [
'routing_number' => $data['client']->routing_id,
'country' => $data['client']->country->iso_3166_2