Skip to content

AuthorizationInformation

Shabab Haider Siddique edited this page May 25, 2021 · 2 revisions

AuthorizationInformation

class AuthorizationInformation extends ResultObject

To perform 3d secure authorization the AuthorizationInformation obj is provided on response of Payment/Create request.

Methods

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

Example

It is retrieved by

$authorizationInformation = $payment->getAuthorizationInformation()

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="{$authorizationInformation->getUrl()}">
          <button type=submit>Click Here</button>
          <input type="hidden" name="PaReq" value="{$authorizationInformation->getData()}" />
          <input type="hidden" name="TermUrl" value="{your_callback_url}" />
          <input type="hidden" name="MD" value="{your_identifier}" />
      </form>
   </body>
</html>

Clone this wiki locally