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) |
Definition at line 34 of file Abstract.php.
getId | ( | ) |
Return response ID
Reimplemented from Varien_Object.
Definition at line 102 of file Abstract.php.
00103 { 00104 return $this->getData('Id'); 00105 }
getStatus | ( | ) |
Return status of respons
Definition at line 92 of file Abstract.php.
00093 { 00094 return $this->getData('Status'); 00095 }
init | ( | $ | responseBody | ) |
Init object
Varien_Simplexml_Element | $responseBody |
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
Varien_Simplexml_Element | $responseBody |
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 }
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.