Skip to content

Commit 1a83707

Browse files
author
has.well
committed
depercated unused get3dsFormContent
1 parent 6c25bca commit 1a83707

File tree

2 files changed

+6
-24
lines changed

2 files changed

+6
-24
lines changed

examples/Pcidss/with3ds.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,11 @@
6868
<td>Build an HTML form and using it submit customer to acs_url:</td>
6969
<td><?php print(\Cloudipsp\Pcidss::get3dsFrom($orderData->getData(), $response_url . '/examples/Pcidss/3dsresult.php')); ?></td>
7070
</tr>
71-
<tr>
72-
<td>Getting data from acs_url:</td>
73-
<td><?php print_r($orderData->get3dsFormContent('/examples/Pcidss/3dsresult.php')); ?></td>
74-
</tr>
7571
</tbody>
7672
</table>
7773
</body>
7874
</html>
7975
<?php
8076
} catch (\Exception $e) {
8177
echo "Fail: " . $e->getMessage();
82-
}
78+
}

lib/Response/PcidssResponse.php

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
namespace Cloudipsp\Response;
44

5-
use Cloudipsp\Helper;
6-
use Cloudipsp\Exception\ApiException;
7-
use Cloudipsp\Configuration;
5+
use Cloudipsp\Pcidss;
86

97
class PcidssResponse extends Response
108
{
@@ -21,26 +19,14 @@ public function is3ds()
2119
}
2220

2321
/**
24-
* get form page for 3ds step 2
2522
* @param string $response_url
2623
* @return mixed
27-
* @throws ApiException
24+
* @throws \Cloudipsp\Exception\ApiException
2825
*/
2926
public function get3dsFormContent($response_url = '')
3027
{
28+
trigger_error('Deprecated: this function is deprecated use get3dsForm instead!', E_NOTICE);
3129
$data = $this->getData();
32-
33-
if (!isset($data['md'])) {
34-
throw new ApiException('Required param MD is missing or empty.');
35-
}
36-
Helper\ValidationHelper::validateURL($data['acs_url']);
37-
$formData = [
38-
'PaReq' => $data['pareq'],
39-
'MD' => $data['md'],
40-
'TermUrl' => $response_url ? $response_url : ''
41-
];
42-
$client = Configuration::getHttpClient();
43-
$form3dsContent = $client->request('POST', $data['acs_url'], ['Content-Type: multipart/form-data'], $formData);
44-
return $form3dsContent;
30+
return Pcidss::get3dsFrom($data, $response_url);
4531
}
46-
}
32+
}

0 commit comments

Comments
 (0)