Source for file getexpresscheckoutdetails.php

Documentation is available at getexpresscheckoutdetails.php

  1. <?php
  2.  
  3. /**
  4.  * GetExpressCheckoutDetails Object
  5.  *
  6.  * This class is used to perform the GetExpressCheckoutDetails 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 ExpressCheckout
  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 ExpressCheckout
  24.  */
  25. final class GetExpressCheckoutDetails 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.      * Token value returned from setExpressCheckout
  37.      *
  38.      * This is a 20 single-byte characters timestamped token, the value of which was returned by SetExpressCheckoutResponse
  39.      * 
  40.      * @var string 
  41.      * @access private
  42.      */
  43.     private $tokenValue;
  44.     
  45.     
  46.     /**
  47.      * Prepares the message to be sent
  48.      *
  49.      * This method prepares the message to be sent to the
  50.      * Paypal Webservice
  51.      * 
  52.      * @access public
  53.      * @param string $Token 
  54.      */
  55.     public function setParams($Token)
  56.     {
  57.         $this->tokenValue $Token;
  58.     }
  59.     
  60.     /**
  61.      * Executes the 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['Token']   $this->tokenValue;
  77.             
  78.             $this->apiMessage array('GetExpressCheckoutDetailsRequest' => $this->apiMessage);
  79.             
  80.             $this->apiMessage array($this->apiMessage);
  81.             
  82.             parent::registerAPIResponse(PayPalBase::getSoapClient()->__soapCall('GetExpressCheckoutDetails'$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