Public Member Functions | |
setQuote (Mage_Sales_Model_Quote $quote) | |
getQuote () | |
importData (array $data) | |
getCheckoutRedirectUrl () | |
getOrderPlaceRedirectUrl () | |
Protected Member Functions | |
_construct () | |
_beforeSave () | |
Protected Attributes | |
$_eventPrefix = 'sales_quote_payment' | |
$_eventObject = 'payment' | |
$_quote |
Definition at line 30 of file Payment.php.
_beforeSave | ( | ) | [protected] |
Prepare object for save
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 101 of file Payment.php.
00102 { 00103 try { 00104 $method = $this->getMethodInstance(); 00105 } catch (Mage_Core_Exception $e) { 00106 return parent::_beforeSave(); 00107 } 00108 $method->prepareSave(); 00109 if ($this->getQuote()) { 00110 $this->setParentId($this->getQuote()->getId()); 00111 } 00112 return parent::_beforeSave(); 00113 }
_construct | ( | ) | [protected] |
Initialize resource model
Reimplemented from Varien_Object.
Definition at line 40 of file Payment.php.
00041 { 00042 $this->_init('sales/quote_payment'); 00043 }
getCheckoutRedirectUrl | ( | ) |
Definition at line 115 of file Payment.php.
00116 { 00117 $method = $this->getMethodInstance(); 00118 00119 return $method ? $method->getCheckoutRedirectUrl() : false; 00120 }
getOrderPlaceRedirectUrl | ( | ) |
Definition at line 122 of file Payment.php.
00123 { 00124 $method = $this->getMethodInstance(); 00125 00126 return $method ? $method->getOrderPlaceRedirectUrl() : false; 00127 }
getQuote | ( | ) |
Retrieve quote model instance
Definition at line 63 of file Payment.php.
importData | ( | array $ | data | ) |
Import data
array | $data |
Definition at line 74 of file Payment.php.
00075 { 00076 $data = new Varien_Object($data); 00077 Mage::dispatchEvent( 00078 $this->_eventPrefix . '_import_data_before', 00079 array( 00080 $this->_eventObject=>$this, 00081 'input'=>$data, 00082 ) 00083 ); 00084 00085 $this->setMethod($data->getMethod()); 00086 $method = $this->getMethodInstance(); 00087 00088 $method->assignData($data); 00089 /* 00090 * validating the payment data 00091 */ 00092 $method->validate(); 00093 return $this; 00094 }
setQuote | ( | Mage_Sales_Model_Quote $ | quote | ) |
Declare quote model instance
Mage_Sales_Model_Quote | $quote |
Definition at line 51 of file Payment.php.
00052 { 00053 $this->_quote = $quote; 00054 $this->setQuoteId($quote->getId()); 00055 return $this; 00056 }
$_eventObject = 'payment' [protected] |
$_eventPrefix = 'sales_quote_payment' [protected] |
$_quote [protected] |
Definition at line 35 of file Payment.php.