Skip to content

ThreeDS2AuthorizationInformation

Shabab Haider Siddique edited this page May 25, 2021 · 1 revision

ThreeDS2AuthorizationInformation

class ThreeDS2AuthorizationInformation extends ResultObject

To perform 3d secure authorization the ThreeDS2AuthorizationInformation obj is provided

Methods

Name Return Type Description
getAcsUrl() public string Url of the ACS server where customer will be redirected to perform authorization. Value assigned by cardinity
getCReq() public string Authorization data that will accompany the request

Example

It is retrieved by

$threeds2AuthorizationInfo = $payment->getThreeds2Data()

To finish the 3D secure authorization HTTP post must be called to the acs url.

<html>
   <head>
      <title>3-D Secure Example</title>
      <script type="text/javascript">
          function OnLoadEvent()
          {
            // Make the form post as soon as it has been loaded.
            document.ThreeDForm.submit();
          }
      </script>
   </head>
   <body onload="OnLoadEvent();">
      <p>
          If your browser does not start loading the page,
          press the button below.
          You will be sent back to this site after you
          authorize the transaction.
      </p>
      <form name="ThreeDForm" method="POST" action="{$threeds2AuthorizationInfo->getAcsUrl()}">
          <button type=submit>Click Here</button>
          <input type="hidden" name="creq" value="{$threeds2AuthorizationInfo->getCReq()}" />
          <input type="hidden" name="threeDSSessionData" value="{your_identifier}" />
      </form>
   </body>
</html>

Clone this wiki locally