Skip to content

Commit

Permalink
fix deviceId handling on TransIt
Browse files Browse the repository at this point in the history
  • Loading branch information
MSmedal committed Jun 18, 2021
1 parent b75db2d commit 3d1833a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Gateways/Clients/SdkClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 3d1833a

Please sign in to comment.