Class Mage_Sales_Model_Order_Payment
Order payment information
- Varien_Object
- Mage_Core_Model_Abstract
- Mage_Payment_Model_Info
- Mage_Sales_Model_Order_Payment
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Sales/Model/Order/Payment.php
protected
|
|
public
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
registerCaptureNotification( float $amount )
Process a capture notification from a payment gateway for specified amount Creates an invoice automatically if the amount covers the order base grand total completely Updates transactions hierarchy, if required Prevents transaction double processing Updates payment totals, updates order status and adds proper comments |
public
|
|
public
|
#
pay(
Register payment fact: update self totals from the invoice |
public
|
#
cancelInvoice(
Cancel specified invoice: update self totals from it |
protected
|
|
public
boolean
|
|
public
|
|
public
Mage_Sales_Model_Payment
|
|
public
|
#
refund(
Refund payment online or offline, depending on whether there is invoice set in the creditmemo instance Updates transactions hierarchy, if required Updates payment totals, updates order status and adds proper comments |
public
|
#
registerRefundNotification( float $amount )
Process payment refund notification Updates transactions hierarchy, if
required Prevents transaction double processing Updates payment totals, updates
order status and adds proper comments TODO: potentially a full capture can be
refunded. In this case if there was only one invoice for that transaction |
public
|
#
cancelCreditmemo(
Cancel a creditmemo: substract its totals from the payment |
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
|
#
registerPaymentReviewAction( string $action, boolean $isOnline )
Perform the payment review action: either initiated by merchant or by a notification |
protected
|
|
protected
|
#
_authorize( boolean $isOnline, float $amount )
Authorize payment either online or offline (process auth notification) Updates transactions hierarchy, if required Prevents transaction double processing Updates payment totals, updates order status and adds proper comments |
public
|
|
protected
|
#
_void( boolean $isOnline, float $amount = null, string $gatewayCallback = 'void' )
Void payment either online or offline (process void notification) NOTE: that
in some cases authorization can be voided after a capture. In such case it makes
sense to use |
protected
null|
|
#
_addTransaction( string $type,
Create transaction, prepare its insertion into hierarchy and add its information to payment and comments |
public
null|
|
#
addTransaction( string $type,
Public acces to _addTransaction method |
public
|
#
importTransactionInfo(
Import details data of specified transaction |
public
|
|
protected
|
#
_updateTotals( array $data )
Totals updater utility method Updates self totals by keys in data array('key' => $delta) |
protected
boolean
|
#
_isTransactionExists( string $txnId = null )
Check transaction existence by specified transaction id |
protected
string
|
#
_appendTransactionToMessage(
Append transaction ID (if any) message to the specified message |
protected
string|
|
#
_prependMessage( string|
Prepend a "prepared_message" that may be set to the payment instance before, to the specified message Prepends value to the specified string or to the comment of specified order status history item instance |
protected
string|float
|
#
_formatAmount( string|float $amount, boolean $asFloat = false )
Round up and cast specified amount to float or string |
protected
string
|
|
protected
|
|
public
|
|
public
|
#
getAuthorizationTransaction( )
Lookup an authorization transaction using parent transaction id, if set |
public
|
|
protected
|
#
_generateTransactionId( string $type,
Update transaction ids for further processing If no transactions were set before invoking, may generate an "offline" transaction id |
protected
boolean
|
#
_isCaptureFinal( float $amountToCapture )
Decide whether authorization transaction may close (if the amount to capture will cover entire order) |
protected
|
|
protected
|
#
_createBillingAgreement( )
Generate billing agreement object if there is billing agreement data Adds it to order as related object |
public
|
|
public
mixed
|
|
public
|
|
protected
|
string |
REVIEW_ACTION_ACCEPT
|
'accept' |
#
Actions for payment when it triggered review state |
string |
REVIEW_ACTION_DENY
|
'deny' |
|
string |
REVIEW_ACTION_UPDATE
|
'update' |
protected
|
$_order |
|
#
Order model object |
protected
|
$_billingAgreement | null |
#
Billing agreement instance that may be created during payment processing |
protected
string
|
$_canVoidLookup | null |
#
Whether can void |
protected
array
|
$_transactionsLookup | array() |
#
Transactions registry to spare resource calls array(txn_id => sales/order_payment_transaction) |
protected
string
|
$_eventPrefix | 'sales_order_payment' |
#
Prefix of model events names |
protected
string
|
$_eventObject | 'payment' |
#
Parameter name in event |
protected
array
|
$_transactionAdditionalInfo | array() |
#
Transaction addditional information container |
$_additionalInformation
|
$_cacheTag,
$_dataSaveAllowed,
$_isObjectNew,
$_resource,
$_resourceCollectionName,
$_resourceName
|