From 3d1833ae06a6c61107e4d086daaa33c304787311 Mon Sep 17 00:00:00 2001 From: Tony Smedal Date: Fri, 18 Jun 2021 11:49:35 -0400 Subject: [PATCH] fix deviceId handling on TransIt --- src/Gateways/Clients/SdkClient.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Gateways/Clients/SdkClient.php b/src/Gateways/Clients/SdkClient.php index 1d0229b..5c67518 100644 --- a/src/Gateways/Clients/SdkClient.php +++ b/src/Gateways/Clients/SdkClient.php @@ -315,7 +315,7 @@ protected function configure_sdk() { $gatewayConfig = new TransitConfig(); $gatewayConfig->acceptorConfig = new AcceptorConfig(); // defaults should work here if ( $this->get_arg( RequestArg::TXN_TYPE ) === AbstractGateway::TXN_TYPE_CREATE_MANIFEST ) { - $gatewayConfig->deviceId = $this->args[ RequestArg::SERVICES_CONFIG ]['tsepDeviceId']; + $gatewayConfig->deviceId = $this->get_arg( RequestArg::SERVICES_CONFIG )['tsepDeviceId']; } break; case GatewayProvider::GENIUS: @@ -339,6 +339,12 @@ protected function configure_sdk() { protected function set_object_data( $obj, array $data ) { foreach ( $data as $key => $value ) { if ( property_exists( $obj, $key ) ) { + if ( + $key === 'deviceId' && + $this->get_arg( RequestArg::TXN_TYPE ) === AbstractGateway::TXN_TYPE_CREATE_MANIFEST + ) { + continue; + } $obj->{$key} = $value; } }