Class Mage_Payment_Model_Method_Abstract

Description

Payment method abstract model

Located in /Payment/Model/Method/Abstract.php (line 32)

Varien_Object
   |
   --Mage_Payment_Model_Method_Abstract
Direct descendents
Class Description
Mage_Paypal_Model_Express PayPal Express Module
Mage_Paypal_Model_Standard PayPal Standard Checkout Module
Mage_Payment_Model_Method_Purchaseorder Magento
Mage_Payment_Model_Method_Free Free payment method
Mage_Payment_Model_Method_Cc Magento
Mage_Payment_Model_Method_Checkmo Magento
Mage_Sales_Model_Payment_Method_Billing_AgreementAbstract Sales Billing Agreement Payment Method Abstract model
Mage_GoogleCheckout_Model_Payment Magento
Class Constant Summary
ACTION_AUTHORIZE = 'authorize'
ACTION_AUTHORIZE_CAPTURE = 'authorize_capture'
ACTION_ORDER = 'order'
STATUS_APPROVED = 'APPROVED'
STATUS_DECLINED = 'DECLINED'
STATUS_ERROR = 'ERROR'
STATUS_SUCCESS = 'SUCCESS'
STATUS_UNKNOWN = 'UNKNOWN'
STATUS_VOID = 'VOID'
Variable Summary
Method Summary
Mage_Payment_Model_Method_Abstract __construct ()
Mage_Payment_Model_Abstract authorize ( $payment, float $amount, Varien_Object $orderPayment)
bool canAuthorize ()
bool canCapture ()
Mage_Payment_Model_Abstract cancel ( $payment, Varien_Object $invoicePayment)
bool canEdit ()
bool canOrder ()
bool canRefund ()
bool canReviewPayment (Mage_Payment_Model_Info $payment, bool $soft)
bool canUseCheckout ()
bool canUseForCountry ( $country)
boolean canUseForCurrency (string $currencyCode)
bool canUseInternal ()
bool canVoid ( $payment)
Mage_Payment_Model_Abstract capture ( $payment, float $amount, Varien_Object $orderPayment)
void debugData (mixed $debugData)
array fetchTransactionInfo (Mage_Payment_Model_Info $payment, string $transactionId)
string getCode ()
mixed getConfigData (string $field, [ $storeId = null])
bool getDebugFlag ()
string getFormBlockType ()
string getInfoBlockType ()
string getTitle ()
Mage_Payment_Model_Abstract initialize (string $paymentAction,  $stateObject)
bool isAvailable ([Mage_Sales_Model_Quote $quote = null])
bool isGateway ()
Mage_Payment_Model_Abstract order ( $payment,  $amount, Varien_Object $orderPayment)
Mage_Payment_Model_Abstract prepareSave ()
Mage_Payment_Model_Abstract refund ( $payment, float $amount, Varien_Object $invoicePayment)
Mage_Payment_Model_Abstract validate (Varien_Object $info)
Mage_Payment_Model_Abstract void ( $payment, Varien_Object $invoicePayment)
void _debug (mixed $debugData)
Variables
bool $_canCancelInvoice = false (line 74)

TODO: whether a captured transaction may be voided by this gateway

This may happen when amount is captured, but not settled

  • access: protected
mixed $_canCreateBillingAgreement = false (line 67)
  • access: protected

Redefined in descendants as:
mixed $_canManageRecurringProfiles = true (line 68)
  • access: protected

Redefined in descendants as:
mixed $_canOrder = false (line 54)
  • access: protected

Redefined in descendants as:
array $_debugReplacePrivateDataKeys = array() (line 81)

Fields that should be replaced in debug with '***'

  • access: protected

Redefined in descendants as:
bool $_isGateway = false (line 53)

Payment Method features

  • access: protected

Redefined in descendants as:
Methods
acceptPayment (line 544)

Attempt to accept a payment that us under review

  • throws: Mage_Core_Exception
  • access: public
bool acceptPayment (Mage_Payment_Model_Info $payment)

Redefined in descendants as:
Constructor __construct (line 83)
  • access: public
Mage_Payment_Model_Method_Abstract __construct ()

Redefined in descendants as:
assignData (line 598)

Assign data to info model instance

  • access: public
Mage_Payment_Model_Info assignData (mixed $data)
  • mixed $data

Redefined in descendants as:
authorize (line 404)

Authorize

  • access: public
Mage_Payment_Model_Abstract authorize ( $payment, float $amount, Varien_Object $orderPayment)
  • Varien_Object $orderPayment
  • float $amount
  • Varien_Object $payment

Redefined in descendants as:
canAuthorize (line 103)

Check authorise availability

  • access: public
bool canAuthorize ()
canCapture (line 113)

Check capture availability

  • access: public
bool canCapture ()

Redefined in descendants as:
canCapturePartial (line 123)

Check partial capture availability

  • access: public
bool canCapturePartial ()
cancel (line 492)

Cancel payment (GoogleCheckout)

  • access: public
Mage_Payment_Model_Abstract cancel ( $payment, Varien_Object $invoicePayment)
  • Varien_Object $invoicePayment
  • Varien_Object $payment

Redefined in descendants as:
canCreateBillingAgreement (line 215)

Check whether payment method instance can create billing agreements

  • access: public
bool canCreateBillingAgreement ()
canEdit (line 195)

Can be edit order (renew order)

  • access: public
bool canEdit ()

Redefined in descendants as:
canFetchTransactionInfo (line 205)

Check fetch transaction info availability

  • access: public
bool canFetchTransactionInfo ()
canManageBillingAgreements (line 288)

Check manage billing agreements availability

  • access: public
bool canManageBillingAgreements ()
canManageRecurringProfiles (line 298)

Whether can manage recurring profiles

  • access: public
bool canManageRecurringProfiles ()
canOrder (line 93)

Check order availability

  • access: public
bool canOrder ()
canRefund (line 133)

Check refund availability

  • access: public
bool canRefund ()

Redefined in descendants as:
canRefundPartialPerInvoice (line 143)

Check partial refund availability for invoice

  • access: public
bool canRefundPartialPerInvoice ()
canReviewPayment (line 532)

Whether this method can accept or deny payment

  • access: public
bool canReviewPayment (Mage_Payment_Model_Info $payment, bool $soft)

Redefined in descendants as:
canUseCheckout (line 175)

Can be used in regular checkout

  • access: public
bool canUseCheckout ()
canUseForCountry (line 257)

To check billing country is allowed for the payment method

  • access: public
bool canUseForCountry ( $country)
  • $country
canUseForCurrency (line 278)

Check method for processing with base currency

  • access: public
boolean canUseForCurrency (string $currencyCode)
  • string $currencyCode

Redefined in descendants as:
canUseForMultishipping (line 185)

Using for multiple shipping address

  • access: public
bool canUseForMultishipping ()
canUseInternal (line 165)

Using internal pages for input payment data Can be used in admin

  • access: public
bool canUseInternal ()
canVoid (line 154)

Check void availability

  • access: public
bool canVoid ( $payment)
  • Varien_Object $payment

Redefined in descendants as:
capture (line 419)

Capture payment

  • access: public
Mage_Payment_Model_Abstract capture ( $payment, float $amount, Varien_Object $orderPayment)
  • Varien_Object $orderPayment
  • float $amount
  • Varien_Object $payment

Redefined in descendants as:
debugData (line 698)

Used to call debug method from not Paymant Method context

  • access: public
void debugData (mixed $debugData)
  • mixed $debugData
denyPayment (line 559)

Attempt to deny a payment that us under review

  • throws: Mage_Core_Exception
  • access: public
bool denyPayment (Mage_Payment_Model_Info $payment)

Redefined in descendants as:
fetchTransactionInfo (line 227)

Fetch transaction info

  • access: public
array fetchTransactionInfo (Mage_Payment_Model_Info $payment, string $transactionId)

Redefined in descendants as:
getCode (line 318)

Retrieve payment method code

  • access: public
string getCode ()
getConfigData (line 583)

Retrieve information from payment configuration

  • access: public
mixed getConfigData (string $field, [ $storeId = null])
  • string $field
  • $storeId

Redefined in descendants as:
getConfigPaymentAction (line 664)

Get config peyment action url Used to universalize payment actions when processing payment place

  • access: public
string getConfigPaymentAction ()

Redefined in descendants as:
getDebugFlag (line 688)

Define if debugging is enabled

  • access: public
bool getDebugFlag ()
getFormBlockType (line 331)

Retrieve block type for method form generation

  • access: public
string getFormBlockType ()
getInfoBlockType (line 341)

Retrieve block type for display method information

  • access: public
string getInfoBlockType ()
getInfoInstance (line 351)

Retrieve payment iformation model object

  • access: public
Mage_Payment_Model_Info getInfoInstance ()
getTitle (line 572)

Retrieve payment method title

  • access: public
string getTitle ()
initialize (line 653)

Method that will be executed instead of authorize or capture if flag isInitilizeNeeded set to true

  • access: public
Mage_Payment_Model_Abstract initialize (string $paymentAction,  $stateObject)
  • string $paymentAction
  • $stateObject

Redefined in descendants as:
isAvailable (line 625)

Check whether payment method can be used

TODO: payment method instance is not supposed to know about quote

  • access: public
bool isAvailable ([Mage_Sales_Model_Quote $quote = null])

Redefined in descendants as:
isGateway (line 237)

Retrieve payment system relation flag

  • access: public
bool isGateway ()
isInitializeNeeded (line 247)

flag if we need to run payment initialize while order place

  • access: public
bool isInitializeNeeded ()
order (line 389)

Order

  • access: public
Mage_Payment_Model_Abstract order ( $payment,  $amount, Varien_Object $orderPayment)
  • Varien_Object $orderPayment
  • Varien_Object $payment
  • $amount

Redefined in descendants as:
prepareSave (line 614)

Parepare info instance for save

  • access: public
Mage_Payment_Model_Abstract prepareSave ()

Redefined in descendants as:
processBeforeRefund (line 449)

Set refund transaction id to payment object for informational purposes Candidate to be deprecated: there can be multiple refunds per payment, thus payment.refund_transaction_id doesn't make big sense

  • access: public
processBeforeVoid (line 505)
  • deprecated: after 1.4.0.0-alpha3 this method doesn't make sense, because invoice must not void entire authorization there should be method for invoice cancellation
  • access: public
processCreditmemo (line 480)

Set transaction ID into creditmemo for informational purposes

  • access: public

Redefined in descendants as:
processInvoice (line 434)

Set capture transaction ID to invoice for informational purposes

  • access: public

Redefined in descendants as:
refund (line 463)

Refund money

  • access: public
Mage_Payment_Model_Abstract refund ( $payment, float $amount, Varien_Object $invoicePayment)
  • Varien_Object $invoicePayment
  • float $amount
  • Varien_Object $payment

Redefined in descendants as:
validate (line 366)

Validate payment method information object

  • access: public
Mage_Payment_Model_Abstract validate (Varien_Object $info)
  • Varien_Object $info

Redefined in descendants as:
void (line 517)

Void payment

  • access: public
Mage_Payment_Model_Abstract void ( $payment, Varien_Object $invoicePayment)
  • Varien_Object $invoicePayment
  • Varien_Object $payment

Redefined in descendants as:
_debug (line 674)

Log debug data to file

  • access: protected
void _debug (mixed $debugData)
  • mixed $debugData
_getHelper (line 308)

Retrieve model helper

  • access: protected
Mage_Payment_Helper_Data _getHelper ()
Class Constants
ACTION_AUTHORIZE = 'authorize' (line 35)
ACTION_AUTHORIZE_CAPTURE = 'authorize_capture' (line 36)
ACTION_ORDER = 'order' (line 34)
STATUS_APPROVED = 'APPROVED' (line 39)
STATUS_DECLINED = 'DECLINED' (line 41)
STATUS_ERROR = 'ERROR' (line 40)
STATUS_SUCCESS = 'SUCCESS' (line 43)
STATUS_UNKNOWN = 'UNKNOWN' (line 38)
STATUS_VOID = 'VOID' (line 42)

Documentation generated on Fri, 11 Feb 2011 16:55:17 +0200 by phpDocumentor 1.4.3