/**
  * Display additional information about a completed authorization
  *
  * Once an IPN has been received to notify the transition of an IPN to
  * one of the terminal states, the merchant may optionally call
  * GetAuthorizationDetails to obtain additional information about the authorization.
  *
  * In countries which require VAT invoicing, this approach will allow you to obtain
  * the buyers billing address so that the invocing requirements can be met.
  */
 private function _getAdditionalInformationForProcessedAuthorization($amazonAuthorizationId)
 {
     // Notification is present, go and get the full
     // information for this notification
     $response = $this->callStepAndCheckForException('getAuthorizationDetails', array($amazonAuthorizationId));
     $this->printResponseToWebpage("printGetAuthorizationDetailsResponse", array($response));
     validateThatAuthorizationIsOpen($response);
 }
 /**
  * Poll the API for the status of the Authorization Request, and continue
  * once the status has been updated
  * Throw an error if the status is not equal to OPEN
  *
  * @param string $amazonAuthorizationId authorization transaction to query
  *
  * @return No value
  */
 private function _waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId)
 {
     $response = $this->callStepAndCheckForException('waitUntilAuthorizationProcessingIsCompleted', array($amazonAuthorizationId));
     printGetAuthorizationDetailsResponse($response);
     validateThatAuthorizationIsOpen($response);
 }
 /**
  * Check that we have received an IPN notification for the authorization
  * 
  * For PHP, there is an IPN handler that will write the contents of the IPN to
  * a file in the format of 
  * <amazonAuthorizationId>_Authorization.
  * This method will check for the presnece of this file 
  * and will loop/timeout until the notification has been handled.
  * 
  * Merchants can use alternative approaches such as memory caches, 
  * shared memory or database storage so that scripts serving user 
  * pages are able to check on the status of a notification
  *
  * @param string $amazonAuthorizationId authorization transaction to query
  *
  * @return void
  */
 private function _waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId)
 {
     // Check for the presence of the ipn notification
     $this->waitForNotificationToBeProcessedBeforeContinuing($amazonAuthorizationId, "AuthorizationNotification");
     // Notification is present, go and get the full
     // information for this notification
     $response = $this->callStepAndCheckForException('getAuthorizationDetails', array($amazonAuthorizationId));
     echo $this->printResponseToWebpage("printGetAuthorizationDetailsResponse", array($response));
     validateThatAuthorizationIsOpen($response);
 }