Source for file gettransactiondetails.php

Documentation is available at gettransactiondetails.php

  1. <?php
  2.  
  3. /**
  4.  * GetTransactionDetails Object
  5.  *
  6.  * This class is used to perform the GetTransactionDetails operation
  7.  * 
  8.  * @author Israel Ekpo <perfectvista@users.sourceforge.net>
  9.  * @copyright Copyright 2007, Israel Ekpo
  10.  * @license http://phppaypalpro.sourceforge.net/LICENSE.txt BSD License
  11.  * @version 0.1.0
  12.  * @package TransactionSearch
  13.  * @filesource
  14.  */
  15.  
  16.  
  17. /**
  18.  * Used to invoke the GetExpressCheckoutDetails Operation
  19.  * 
  20.  * @author Israel Ekpo <perfectvista@users.sourceforge.net>
  21.  * @copyright Copyright 2007, Israel Ekpo
  22.  * @license http://phppaypalpro.sourceforge.net/LICENSE.txt BSD License
  23.  * @package TransactionSearch
  24.  */
  25. final class GetTransactionDetails extends PaypalAPI implements OperationsTemplate
  26. {   
  27.     /**
  28.      * Message Sent to the Webservice
  29.      *
  30.      * @var array 
  31.      * @access private
  32.      */
  33.     private $apiMessage;
  34.     
  35.     /**
  36.      * The TransactionID
  37.      * 
  38.      * The TransactionID to get details for.
  39.      *  
  40.      * @var string 
  41.      * @access private
  42.      */
  43.     private $TransactionID;
  44.     
  45.     
  46.     /**
  47.      * Prepares the message to be sent
  48.      *
  49.      * This method prepares the message containing the TransactionID to be sent to the
  50.      * Paypal Web service
  51.      * 
  52.      * @access public
  53.      * @param string $TransactionID 
  54.      */
  55.     public function setParams($TransactionID)
  56.     {
  57.         $this->TransactionID $TransactionID;
  58.     }
  59.     
  60.     /**
  61.      * Executes the GetTransactionDetails Operation
  62.      *
  63.      * Prepares the final message and the calls the Webservice operation. If it is successfull the response is registered
  64.      * and the OperationStatus is set to true, otherwise the Operation status will be set to false and an Exception of the type
  65.      * soapFault will be registered instead.
  66.      * 
  67.      * @throws SoapFault
  68.      * @access public
  69.      */
  70.     public function execute()
  71.     {
  72.         try
  73.         {
  74.             $this->apiMessage['Version'API_VERSION;
  75.             
  76.             $this->apiMessage['TransactionID']   $this->TransactionID;
  77.             
  78.             $this->apiMessage array('GetTransactionDetailsRequest' => $this->apiMessage);
  79.             
  80.             $this->apiMessage array($this->apiMessage);
  81.             
  82.             parent::registerAPIResponse(PayPalBase::getSoapClient()->__soapCall('GetTransactionDetails'$this->apiMessagenullPayPalBase::getSoapHeader()));
  83.             
  84.             PaypalBase::setOperationStatus(true);           
  85.         }
  86.         
  87.         catch (SoapFault $Exception)
  88.         {
  89.             parent::registerAPIException($Exception);
  90.             
  91.             PaypalBase::setOperationStatus(false);
  92.         }
  93.     }
  94. }
  95. ?>

Documentation generated on Sat, 03 Feb 2007 20:59:01 -0800 by phpDocumentor 1.3.1