diff --git a/src/DataMapper/ResponseDataMapper/PosNetResponseDataMapper.php b/src/DataMapper/ResponseDataMapper/PosNetResponseDataMapper.php index aefa6a36..bdeff45e 100644 --- a/src/DataMapper/ResponseDataMapper/PosNetResponseDataMapper.php +++ b/src/DataMapper/ResponseDataMapper/PosNetResponseDataMapper.php @@ -107,6 +107,7 @@ public function map3DPaymentData(array $raw3DAuthResponseData, ?array $rawPaymen $defaultResponse['proc_return_code'] = $procReturnCode; $defaultResponse['error_code'] = $raw3DAuthResponseData['respCode']; $defaultResponse['error_message'] = $raw3DAuthResponseData['respText']; + $defaultResponse['3d_all'] = $raw3DAuthResponseData; return $defaultResponse; } diff --git a/tests/Unit/DataMapper/ResponseDataMapper/PosNetResponseDataMapperTest.php b/tests/Unit/DataMapper/ResponseDataMapper/PosNetResponseDataMapperTest.php index dd60d976..cbc872cf 100644 --- a/tests/Unit/DataMapper/ResponseDataMapper/PosNetResponseDataMapperTest.php +++ b/tests/Unit/DataMapper/ResponseDataMapper/PosNetResponseDataMapperTest.php @@ -98,6 +98,10 @@ public function testMap3DPaymentData(array $order, string $txType, array $threeD } unset($actualData['transaction_time'], $expectedData['transaction_time']); + + $this->assertArrayHasKey('3d_all', $actualData); + $this->assertIsArray($actualData['3d_all']); + $this->assertNotEmpty($actualData['3d_all']); unset($actualData['all'], $actualData['3d_all']); \ksort($expectedData); \ksort($actualData);