Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract Class Reference

Inheritance diagram for Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract:

Varien_Object Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Cancel Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Error Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Refund Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Settle

List of all members.

Public Member Functions

 init ($responseBody)
 getStatus ()
 getId ()

Public Attributes

const STATUS_CANCELLED = 'Cancelled'
const STATUS_FAILURE = 'Failure'
const STATUS_PENDING = 'Pending'
const STATUS_RESERVED = 'Reserved'
const STATUS_SUCCESS = 'Success'
const STATUS_ERROR = 'Error'

Protected Member Functions

 parse ($responseBody)


Detailed Description

Definition at line 34 of file Abstract.php.


Member Function Documentation

getId (  ) 

Return response ID

Returns:
string

Reimplemented from Varien_Object.

Definition at line 102 of file Abstract.php.

00103     {
00104         return $this->getData('Id');        
00105     }

getStatus (  ) 

Return status of respons

Returns:
string

Definition at line 92 of file Abstract.php.

00093     {
00094         return $this->getData('Status');        
00095     }

init ( responseBody  ) 

Init object

Parameters:
Varien_Simplexml_Element $responseBody
Returns:
Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract

Definition at line 52 of file Abstract.php.

00053     {
00054         if (!$this->parse($responseBody)) {
00055             return false;
00056         }
00057         return $this;
00058     }

parse ( responseBody  )  [protected]

Parse response body

Parameters:
Varien_Simplexml_Element $responseBody
Returns:
bool

Reimplemented in Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Cancel, Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Error, Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Refund, and Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Settle.

Definition at line 66 of file Abstract.php.

00067     {
00068         $responseId = (string)$responseBody->ResponseMetadata->RequestId;
00069         if($responseId == '') {
00070            return false;   
00071         }
00072         $this->setData('Id', $responseId);
00073         
00074         if (!$status = $this->getData('Status')) {
00075             return false;
00076         }
00077         if ($status != self::STATUS_CANCELLED &&
00078             $status != self::STATUS_FAILURE &&
00079             $status != self::STATUS_PENDING &&
00080             $status != self::STATUS_RESERVED &&
00081             $status != self::STATUS_SUCCESS) {
00082               return false;       
00083         }
00084         return true;
00085     }


Member Data Documentation

const STATUS_CANCELLED = 'Cancelled'

Definition at line 39 of file Abstract.php.

const STATUS_ERROR = 'Error'

Definition at line 44 of file Abstract.php.

const STATUS_FAILURE = 'Failure'

Definition at line 40 of file Abstract.php.

const STATUS_PENDING = 'Pending'

Definition at line 41 of file Abstract.php.

const STATUS_RESERVED = 'Reserved'

Definition at line 42 of file Abstract.php.

const STATUS_SUCCESS = 'Success'

Definition at line 43 of file Abstract.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:31 2009 for Magento by  doxygen 1.5.8