Definition at line 32 of file Abstract.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Varien_Object.
Reimplemented in Mage_AmazonPayments_Model_Payment.
Definition at line 63 of file Abstract.php.
_getHelper | ( | ) | [protected] |
Retrieve model helper
Definition at line 226 of file Abstract.php.
00227 { 00228 return Mage::helper('payment'); 00229 }
assignData | ( | $ | data | ) |
Assign data to info model instance
mixed | $data |
Reimplemented in Mage_Payment_Model_Method_Cc, Mage_Payment_Model_Method_Checkmo, Mage_Payment_Model_Method_Purchaseorder, and Mage_PaypalUk_Model_Direct.
Definition at line 428 of file Abstract.php.
00429 { 00430 if (is_array($data)) { 00431 $this->getInfoInstance()->addData($data); 00432 } 00433 elseif ($data instanceof Varien_Object) { 00434 $this->getInfoInstance()->addData($data->getData()); 00435 } 00436 return $this; 00437 }
authorize | ( | Varien_Object $ | payment, | |
$ | amount | |||
) |
Authorize
Varien_Object | $orderPayment |
Reimplemented in Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 307 of file Abstract.php.
00308 { 00309 if (!$this->canAuthorize()) { 00310 Mage::throwException($this->_getHelper()->__('Authorize action is not available')); 00311 } 00312 return $this; 00313 }
canAuthorize | ( | ) |
canCapture | ( | ) |
Check capture availability
Reimplemented in Mage_Paypal_Model_Standard.
Definition at line 83 of file Abstract.php.
canCapturePartial | ( | ) |
cancel | ( | Varien_Object $ | payment | ) |
Cancel payment (GoogleCheckout)
Varien_Object | $invoicePayment |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, and Mage_GoogleCheckout_Model_Payment.
Definition at line 372 of file Abstract.php.
canEdit | ( | ) |
Can be edit order (renew order)
Reimplemented in Mage_GoogleCheckout_Model_Payment.
Definition at line 165 of file Abstract.php.
canRefund | ( | ) |
canRefundPartialPerInvoice | ( | ) |
Check partial refund availability for invoice
Definition at line 113 of file Abstract.php.
canUseCheckout | ( | ) |
canUseForCountry | ( | $ | country | ) |
To check billing country is allowed for the payment method
Definition at line 195 of file Abstract.php.
00196 { 00197 /* 00198 for specific country, the flag will set up as 1 00199 */ 00200 if($this->getConfigData('allowspecific')==1){ 00201 $availableCountries = explode(',', $this->getConfigData('specificcountry')); 00202 if(!in_array($country, $availableCountries)){ 00203 return false; 00204 } 00205 00206 } 00207 return true; 00208 }
canUseForCurrency | ( | $ | currencyCode | ) |
Check method for processing with base currency
string | $currencyCode |
Reimplemented in Mage_Paygate_Model_Authorizenet, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_Paypal_Model_Standard, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 216 of file Abstract.php.
canUseForMultishipping | ( | ) |
Using for multiple shipping address
Reimplemented in Mage_Paypal_Model_Express, and Mage_Paypal_Model_Standard.
Definition at line 155 of file Abstract.php.
canUseInternal | ( | ) |
Using internal pages for input payment data Can be used in admin
Reimplemented in Mage_Paypal_Model_Express, and Mage_Paypal_Model_Standard.
Definition at line 135 of file Abstract.php.
canVoid | ( | Varien_Object $ | payment | ) |
Check void availability
Varien_Object | $invoicePayment |
Reimplemented in Mage_Paygate_Model_Payflow_Pro, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 124 of file Abstract.php.
capture | ( | Varien_Object $ | payment, | |
$ | amount | |||
) |
Capture payment
Varien_Object | $orderPayment |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 321 of file Abstract.php.
00322 { 00323 if (!$this->canCapture()) { 00324 Mage::throwException($this->_getHelper()->__('Capture action is not available')); 00325 } 00326 00327 return $this; 00328 }
getCode | ( | ) |
Retrieve payment method code
Definition at line 236 of file Abstract.php.
00237 { 00238 if (empty($this->_code)) { 00239 Mage::throwException($this->_getHelper()->__('Can not retrieve payment method code')); 00240 } 00241 return $this->_code; 00242 }
getConfigData | ( | $ | field, | |
$ | storeId = null | |||
) |
Retrieve information from payment configuration
string | $field |
Definition at line 413 of file Abstract.php.
00414 { 00415 if (null === $storeId) { 00416 $storeId = $this->getStore(); 00417 } 00418 $path = 'payment/'.$this->getCode().'/'.$field; 00419 return Mage::getStoreConfig($path, $storeId); 00420 }
getFormBlockType | ( | ) |
Retrieve block type for method form generation
Definition at line 249 of file Abstract.php.
getInfoBlockType | ( | ) |
Retirve block type for display method information
Definition at line 259 of file Abstract.php.
getInfoInstance | ( | ) |
Retrieve payment iformation model object
Definition at line 269 of file Abstract.php.
00270 { 00271 $instance = $this->getData('info_instance'); 00272 if (!($instance instanceof Mage_Payment_Model_Info)) { 00273 Mage::throwException($this->_getHelper()->__('Can not retrieve payment iformation object instance')); 00274 } 00275 return $instance; 00276 }
getTitle | ( | ) |
Retrieve payment method title
Definition at line 402 of file Abstract.php.
00403 { 00404 return $this->getConfigData('title'); 00405 }
initialize | ( | $ | paymentAction, | |
$ | stateObject | |||
) |
Method that will be executed instead of authorize or capture if flag isInitilizeNeeded set to true
string | $paymentAction |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_Paypal_Model_Express, Mage_Paypal_Model_Standard, and Mage_PaypalUk_Model_Express.
Definition at line 466 of file Abstract.php.
isAvailable | ( | $ | quote = null |
) |
Return true if the method can be used at this time
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, and Mage_Payment_Model_Method_Free.
Definition at line 454 of file Abstract.php.
isGateway | ( | ) |
isInitializeNeeded | ( | ) |
flag if we need to run payment initialize while order place
Reimplemented in Mage_AmazonPayments_Model_Payment_Cba, Mage_Paypal_Model_Express, Mage_Paypal_Model_Standard, and Mage_PaypalUk_Model_Express.
Definition at line 185 of file Abstract.php.
prepareSave | ( | ) |
Parepare info instance for save
Reimplemented in Mage_Payment_Model_Method_Cc.
Definition at line 444 of file Abstract.php.
processBeforeRefund | ( | $ | invoice, | |
$ | payment | |||
) |
Definition at line 336 of file Abstract.php.
00337 { 00338 $payment->setRefundTransactionId($invoice->getTransactionId()); 00339 return $this; 00340 }
processBeforeVoid | ( | $ | invoice, | |
$ | payment | |||
) |
Definition at line 377 of file Abstract.php.
00378 { 00379 $payment->setVoidTransactionId($invoice->getTransactionId()); 00380 return $this; 00381 }
processCreditmemo | ( | $ | creditmemo, | |
$ | payment | |||
) |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp.
Definition at line 360 of file Abstract.php.
00361 { 00362 $creditmemo->setTransactionId($payment->getLastTransId()); 00363 return $this; 00364 }
processInvoice | ( | $ | invoice, | |
$ | payment | |||
) |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, and Mage_AmazonPayments_Model_Payment_Cba.
Definition at line 330 of file Abstract.php.
refund | ( | Varien_Object $ | payment, | |
$ | amount | |||
) |
Refund money
Varien_Object | $invoicePayment |
Reimplemented in Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 349 of file Abstract.php.
00350 { 00351 00352 if (!$this->canRefund()) { 00353 Mage::throwException($this->_getHelper()->__('Refund action is not available')); 00354 } 00355 00356 00357 return $this; 00358 }
validate | ( | ) |
Validate payment method information object
Varien_Object | $info |
to validate paymene method is allowed for billing country or not
Reimplemented in Mage_Payment_Model_Method_Cc, and Mage_Paypal_Model_Standard.
Definition at line 284 of file Abstract.php.
00285 { 00286 /** 00287 * to validate paymene method is allowed for billing country or not 00288 */ 00289 $paymentInfo = $this->getInfoInstance(); 00290 if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) { 00291 $billingCountry = $paymentInfo->getOrder()->getBillingAddress()->getCountryId(); 00292 } else { 00293 $billingCountry = $paymentInfo->getQuote()->getBillingAddress()->getCountryId(); 00294 } 00295 if (!$this->canUseForCountry($billingCountry)) { 00296 Mage::throwException($this->_getHelper()->__('Selected payment type is not allowed for billing country.')); 00297 } 00298 return $this; 00299 }
void | ( | Varien_Object $ | payment | ) |
Void payment
Varien_Object | $invoicePayment |
Reimplemented in Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 389 of file Abstract.php.
00390 { 00391 if (!$this->canVoid($payment)) { 00392 Mage::throwException($this->_getHelper()->__('Void action is not available')); 00393 } 00394 return $this; 00395 }
$_canAuthorize = false [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 52 of file Abstract.php.
$_canCapture = false [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 53 of file Abstract.php.
$_canCapturePartial = false [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 54 of file Abstract.php.
$_canRefund = false [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 55 of file Abstract.php.
$_canRefundInvoicePartial = false [protected] |
$_canUseCheckout = true [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 59 of file Abstract.php.
$_canUseForMultishipping = true [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 60 of file Abstract.php.
$_canUseInternal = true [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 58 of file Abstract.php.
$_canVoid = false [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 57 of file Abstract.php.
$_code [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_AmazonPayments_Model_Payment, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Payment_Model_Method_Ccsave, Mage_Payment_Model_Method_Checkmo, Mage_Payment_Model_Method_Free, Mage_Payment_Model_Method_Purchaseorder, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_Paypal_Model_Standard, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 44 of file Abstract.php.
$_formBlockType = 'payment/form' [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_AmazonPayments_Model_Payment, Mage_GoogleCheckout_Model_Payment, Mage_Payment_Model_Method_Cc, Mage_Payment_Model_Method_Ccsave, Mage_Payment_Model_Method_Checkmo, Mage_Payment_Model_Method_Purchaseorder, Mage_Paypal_Model_Express, Mage_Paypal_Model_Standard, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 45 of file Abstract.php.
$_infoBlockType = 'payment/info' [protected] |
Reimplemented in Mage_Payment_Model_Method_Cc, Mage_Payment_Model_Method_Ccsave, Mage_Payment_Model_Method_Checkmo, Mage_Payment_Model_Method_Purchaseorder, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 46 of file Abstract.php.
$_isGateway = false [protected] |
Availability options
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_AmazonPayments_Model_Payment_Cba, Mage_GoogleCheckout_Model_Payment, Mage_Paygate_Model_Authorizenet, Mage_Paygate_Model_Payflow_Pro, Mage_Paypal_Model_Direct, Mage_Paypal_Model_Express, Mage_PaypalUk_Model_Direct, and Mage_PaypalUk_Model_Express.
Definition at line 51 of file Abstract.php.
$_isInitializeNeeded = false [protected] |
Reimplemented in Mage_AmazonPayments_Model_Payment_Asp, Mage_Paypal_Model_Express, and Mage_PaypalUk_Model_Express.
Definition at line 61 of file Abstract.php.
const ACTION_AUTHORIZE = 'authorize' |
Reimplemented in Mage_AmazonPayments_Model_Payment, and Mage_GoogleCheckout_Model_Payment.
Definition at line 34 of file Abstract.php.
const ACTION_AUTHORIZE_CAPTURE = 'authorize_capture' |
Reimplemented in Mage_AmazonPayments_Model_Payment, and Mage_GoogleCheckout_Model_Payment.
Definition at line 35 of file Abstract.php.
const STATUS_APPROVED = 'APPROVED' |
Definition at line 38 of file Abstract.php.
const STATUS_DECLINED = 'DECLINED' |
Definition at line 40 of file Abstract.php.
const STATUS_ERROR = 'ERROR' |
Definition at line 39 of file Abstract.php.
const STATUS_SUCCESS = 'SUCCESS' |
Definition at line 42 of file Abstract.php.
const STATUS_UNKNOWN = 'UNKNOWN' |
Definition at line 37 of file Abstract.php.
const STATUS_VOID = 'VOID' |
Definition at line 41 of file Abstract.php.