Source for file transactionsearch.php

Documentation is available at transactionsearch.php

  1. <?php
  2.  
  3. /**
  4.  * TransactionSearch Object
  5.  *
  6.  * This class is used to perform the TransactionSearch 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 TransactionSearch 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 TransactionSearch 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.     /**
  37.      * Generates the TransactionSearchRequestType
  38.      * 
  39.      * Prepares a multi-dimensional array for the message to be used in the search.
  40.      *
  41.      * @param integer $StartDate UNIXTIMESTAMP
  42.      * @param intefer $EndDate UNIXTIMESTAMP
  43.      * @param string $PayerEmail 
  44.      * @param string $ReceiverEmail 
  45.      * @param string $ReceiptID 
  46.      * @param string $TransactionID 
  47.      * @param string $PayerName 
  48.      * @param string $AuctionItemNumber 
  49.      * @param string $InvoiceID 
  50.      * @param string $CardNumber 
  51.      * @param string $TransactionClass 
  52.      * @param float $Amount 
  53.      * @param string $CurrencyCode 
  54.      * @param string $Status 
  55.      * @param string $currencyID 
  56.      */
  57.  
  58.     public function setParams($StartDate$EndDate 0$PayerEmail ''$ReceiverEmail ''$ReceiptID ''$TransactionID ''$PayerName ''$AuctionItemNumber ''$InvoiceID ''$CardNumber ''$TransactionClass ''$Amount ''$CurrencyCode ''$Status ''$currencyID 'USD')
  59.     {
  60.         $this->apiMessage PayPalTypes::TransactionSearchRequestType($StartDate$EndDate$PayerEmail$ReceiverEmail$ReceiptID$TransactionID$PayerName$AuctionItemNumber$InvoiceID$CardNumber$TransactionClass$Amount$CurrencyCode$Status$currencyID);
  61.     }
  62.     
  63.     /**
  64.      * Executes the Operation
  65.      *
  66.      * Prepares the final message and the calls the Webservice operation. If it is successfull the response is registered
  67.      * and the OperationStatus is set to true, otherwise the Operation status will be set to false and an Exception of the type
  68.      * soapFault will be registered instead.
  69.      * 
  70.      * @throws SoapFault
  71.      * @access public
  72.      */
  73.     public function execute()
  74.     {
  75.         try
  76.         {
  77.             $this->apiMessage['Version'API_VERSION;
  78.             
  79.             $this->apiMessage array('TransactionSearchRequest' => $this->apiMessage);
  80.             
  81.             $this->apiMessage array($this->apiMessage);
  82.             
  83.             parent::registerAPIResponse(PayPalBase::getSoapClient()->__soapCall('TransactionSearch'$this->apiMessagenullPayPalBase::getSoapHeader()));
  84.             
  85.             PaypalBase::setOperationStatus(true);           
  86.         }
  87.         
  88.         catch (SoapFault $Exception)
  89.         {
  90.             parent::registerAPIException($Exception);
  91.             
  92.             PaypalBase::setOperationStatus(false);
  93.         }
  94.     }
  95. }
  96. ?>

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