Documentation

Mage_Sales_Model_Order_Payment extends Mage_Payment_Model_Info
in package

Table of Contents

Constants

REVIEW_ACTION_ACCEPT  : mixed = 'accept'
Actions for payment when it triggered review state:
REVIEW_ACTION_DENY  : mixed = 'deny'
Deny action
REVIEW_ACTION_UPDATE  : mixed = 'update'
Update action

Properties

$_additionalInformation  : array<string|int, mixed>|int
Additional information container
$_billingAgreement  : Mage_Sales_Model_Billing_Agreement
Billing agreement instance that may be created during payment processing
$_cacheTag  : string|bool|array<string|int, mixed>
Model cache tag for clear cache in after save and after delete
$_canVoidLookup  : bool|null
Whether can void
$_data  : array<string|int, mixed>|null
Object attributes
$_dataSaveAllowed  : bool
Flag which can stop data saving after before save Can be used for next sequence: we check data in _beforeSave, if data are not valid - we can set this flag to false value and save process will be stopped
$_dirty  : array<string|int, mixed>
$_eventObject  : string
$_eventPrefix  : string
$_hasDataChanges  : bool
Data changes flag (true after setData|unsetData call)
$_idFieldName  : string
Name of object id field
$_invoice  : Mage_Sales_Model_Order_Invoice|null
Invoice currently being captured, exposed to gateway methods during capture()
$_isDeleted  : bool
Object delete flag
$_isObjectNew  : bool|null
Flag which allow detect object state: is it new object (without id) or existing one (with id)
$_oldFieldsMap  : array<string|int, mixed>
Map short fields names to its full names
$_order  : Mage_Sales_Model_Order
Order model object
$_origData  : array<string|int, mixed>|null
Original data that was loaded
$_resource  : Mage_Core_Model_Resource_Db_Abstract
Resource model instance
$_resourceCollectionName  : string
Name of the resource collection model
$_resourceName  : string
Name of the resource model
$_syncFieldsMap  : mixed
Map of fields to sync to other fields upon changing their data
$_transactionAdditionalInfo  : array<string|int, mixed>
Transaction addditional information container
$_transactionsLookup  : array<string|int, mixed>
Transactions registry to spare resource calls [txn_id => sales/order_payment_transaction]
$_underscoreCache  : array<string|int, mixed>
Setter/Getter underscore transformation cache

Methods

__call()  : mixed
Set/Get attribute wrapper
__construct()  : mixed
Constructor
__get()  : mixed
Attribute getter (deprecated)
__set()  : mixed
Attribute setter (deprecated)
__toArray()  : array<string|int, mixed>
Convert object attributes to array
_getResource()  : Mage_Sales_Model_Resource_Order_Payment
Get resource instance
accept()  : $this
Accept online a payment that is in review state
addData()  : $this
Add data to the object.
addTransaction()  : null|Mage_Sales_Model_Order_Payment_Transaction
Public access to _addTransaction method
afterCommitCallback()  : $this
Callback function which called after transaction commit in resource model
afterLoad()  : $this
Object after load processing. Implemented as public interface for supporting objects after load in collections
authorize()  : $this
Public access to _authorize method
canCapture()  : bool
Check order payment capture action availability
canCapturePartial()  : bool
Check whether partial capture could be done
cancel()  : $this
Order cancellation hook for payment method instance Adds void transaction if needed
cancelCreditmemo()  : $this
Cancel a credit memo: subtract its totals from the payment
cancelInvoice()  : $this
Cancel specified invoice: update self totals from it
canFetchTransactionInfo()  : bool
Check whether fetching info of transaction could be done
canRefund()  : bool
Check whether refund could be done
canRefundPartialPerInvoice()  : bool
Check whether partial refund could be done
canReviewPayment()  : bool
Check order payment review availability
canVoid()  : bool
Check order payment void availability
capture()  : $this
Capture the payment online Requires an invoice. If there is no invoice specified, will automatically prepare an invoice for order Updates transactions hierarchy, if required Updates payment totals, updates order status and adds proper comments
cleanModelCache()  : $this
Remove model object related cache
clearInstance()  : $this
Clearing object for correct deleting by garbage collector
dataHasChangedFor()  : bool
Compare object data with original data
debug()  : string|array<string|int, mixed>
Present object data as string in debug mode
decrypt()  : string
Decrypt data
delete()  : $this
Delete object from database
deny()  : $this
Accept order with payment method instance
encrypt()  : string
Encrypt data
flagDirty()  : $this
getAccountStatus()  : string|null
getAdditionalData()  : string|null
getAdditionalInformation()  : array<string|int, mixed>|null|mixed
Getter for entire additional_information value or one of its element by key
getAddressStatus()  : string|null
getAmountAuthorized()  : float|null
getAmountCanceled()  : float|null
getAmountOrdered()  : float|null
getAmountPaid()  : float|null
getAmountRefunded()  : float|null
getAnetTransMethod()  : string|null
getAuthorizationTransaction()  : Mage_Sales_Model_Order_Payment_Transaction|false
Lookup an authorization transaction using parent transaction id, if set
getBaseAmountAuthorized()  : float|null
getBaseAmountCanceled()  : float|null
getBaseAmountOrdered()  : float|null
getBaseAmountPaid()  : float|null
getBaseAmountPaidOnline()  : float|null
getBaseAmountRefunded()  : float|null
getBaseAmountRefundedOnline()  : float|null
getBaseShippingAmount()  : float|null
getBaseShippingCaptured()  : float|null
getBaseShippingRefunded()  : float|null
getBillingAddress()  : Mage_Customer_Model_Address_Abstract|null
getBillingAgreement()  : Mage_Sales_Model_Billing_Agreement|null
Get the billing agreement, if any
getBillingAgreementData()  : array<string|int, mixed>|null
getCacheIdTags()  : array<string|int, mixed>|false
Get cache tags associated with object id
getCacheTags()  : array<string|int, mixed>|false
Get list of cache tags applied to model object.
getCcApproval()  : string|null
getCcAvsStatus()  : string|null
getCcCid()  : string|null
getCcCidEnc()  : string|null
getCcCidStatus()  : string|null
getCcDebugRequestBody()  : string|null
getCcDebugResponseBody()  : string|null
getCcDebugResponseSerialized()  : string|null
getCcExpMonth()  : string|null
getCcExpYear()  : string|null
getCcLast4()  : string|null
getCcNumber()  : string|null
getCcNumberEnc()  : string|null
getCcOwner()  : string|null
getCcSsIssue()  : string|null
getCcSsStartMonth()  : string|null
getCcSsStartYear()  : string|null
getCcStatus()  : string|null
getCcStatusDescription()  : string|null
getCcTransId()  : string|null
getCcType()  : string|null
getCollection()  : Mage_Sales_Model_Resource_Order_Payment_Collection
getCreatedAt()  : string|null
getCurrencyCode()  : string|null
getCustomerPaymentId()  : int|null
getCybersourceToken()  : string|null
getData()  : mixed
Object data getter
getDataByKey()  : mixed
Get object data by particular key
getDataByPath()  : mixed
Get object data by path
getDataSetDefault()  : mixed
Fast get data or set default if value is not available
getDataUsingMethod()  : mixed
Get object data by key with calling getter method
getEcheckAccountName()  : string|null
getEcheckAccountType()  : string|null
getEcheckBankName()  : string|null
getEcheckRoutingNumber()  : string|null
getEcheckType()  : string|null
getEntityId()  : int
getFlo2cashAccountId()  : string|null
getForcedState()  : string|null
getId()  : int|string|null
Retrieve model object identifier
getIdealIssuerId()  : string|null
getIdealIssuerTitle()  : string|null
getIdealTransactionChecked()  : int|null
getIdFieldName()  : string
Retrieve identifier field name for model
getIncrementId()  : string|null
getInvoice()  : Mage_Sales_Model_Order_Invoice|null
getIsFraudDetected()  : bool|null
getIsTransactionApproved()  : bool|null
getIsTransactionClosed()  : bool|null
getIsTransactionDenied()  : bool|null
getIsTransactionPending()  : bool|null
getLastTransId()  : string|null
getMessage()  : string|null
getMethod()  : string|null
getMethodInstance()  : Mage_Payment_Model_Method_Abstract
Retrieve payment method model object
getNotificationResult()  : bool|null
getOrder()  : Mage_Sales_Model_Order
Retrieve order model object
getOrigData()  : mixed
Get object loaded data (original data)
getParentId()  : int|null
getParentTransactionId()  : string|null
getPayboxQuestionNumber()  : string|null
getPayboxRequestNumber()  : string|null
getPoNumber()  : string|null
getPreparedMessage()  : Mage_Sales_Model_Order_Status_History|string|null
getProtectionEligibility()  : string|null
getQuote()  : Mage_Sales_Model_Quote
getQuotePaymentId()  : int|null
getResource()  : Mage_Sales_Model_Resource_Order_Payment
Retrieve model resource
getResourceCollection()  : Mage_Core_Model_Resource_Db_Collection_Abstract
Get collection instance
getResourceName()  : string
Retrieve model resource name
getShippingAddress()  : Mage_Customer_Model_Address_Abstract|null
getShippingAmount()  : float|null
getShippingCaptured()  : float|null
getShippingRefunded()  : float|null
getShouldCloseParentTransaction()  : bool|null
getSkipOrderProcessing()  : bool|null
getSkipTransactionCreation()  : bool|null
getStoreId()  : int|null
getTransaction()  : Mage_Sales_Model_Order_Payment_Transaction|false
Lookup the transaction by id
getTransactionAdditionalInfo()  : mixed
Additional transaction info getter
getTransactionId()  : string|null
hasAdditionalInformation()  : bool
Check whether there is additional information by specified key
hasData()  : bool
If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.
hasDataChanges()  : bool
Get data change status
hasErrors()  : bool
hasForcedState()  : bool
hasIsTransactionClosed()  : bool
hasMessage()  : bool
hasMethodInstance()  : bool
importTransactionInfo()  : $this
Import details data of specified transaction
isDeleted()  : bool
Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value
isDirty()  : bool
isEmpty()  : bool
checks whether the object is empty
isModuleEnabled()  : bool
isObjectNew()  : bool
Check object state (true - if it is object without id on object just created) This method can help detect if object just created in _afterSave method problem is what in after save object has id and we can't detect what object was created in this transaction
jsonSerialize()  : array<string|int, mixed>
Implementation of JsonSerializable::jsonSerialize()
load()  : $this
Load object data
lookupTransaction()  : Mage_Sales_Model_Order_Payment_Transaction|false
Find one transaction by ID or type
offsetExists()  : bool
Implementation of ArrayAccess::offsetExists()
offsetGet()  : mixed
Implementation of ArrayAccess::offsetGet()
offsetSet()  : void
Implementation of ArrayAccess::offsetSet()
offsetUnset()  : void
Implementation of ArrayAccess::offsetUnset()
pay()  : $this
Register payment fact: update self totals from the invoice
place()  : $this
Authorize or authorize and capture payment on gateway, if applicable This method is supposed to be called only when order is placed
refund()  : $this
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
registerAuthorizationNotification()  : $this
Process authorization notification
registerCaptureNotification()  : $this
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
registerPaymentReviewAction()  : $this
Perform the payment review action: either initiated by merchant or by a notification
registerRefundNotification()  : $this
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 then we should create a creditmemo from invoice and also refund it offline TODO: implement logic of chargebacks reimbursements (via negative amount)
registerVoidNotification()  : $this
Process void notification
resetTransactionAdditionalInfo()  : $this
Reset transaction additional info property
save()  : $this
Save object data
serialize()  : string
serialize object attributes
setAccountStatus()  : static
setAdditionalData()  : static
setAdditionalInformation()  : $this
Additional information setter Updates data inside the 'additional_information' array or all 'additional_information' if key is data array
setAddressStatus()  : static
setAmountAuthorized()  : static
setAmountCanceled()  : static
setAmountOrdered()  : static
setAmountPaid()  : static
setAmountRefunded()  : static
setAnetTransMethod()  : static
setAttribute()  : $this
setBaseAmountAuthorized()  : static
setBaseAmountCanceled()  : static
setBaseAmountOrdered()  : static
setBaseAmountPaid()  : static
setBaseAmountPaidOnline()  : static
setBaseAmountRefunded()  : static
setBaseAmountRefundedOnline()  : static
setBaseShippingAmount()  : static
setBaseShippingCaptured()  : static
setBaseShippingRefunded()  : static
setCcApproval()  : static
setCcAvsStatus()  : static
setCcCid()  : static
setCcCidStatus()  : static
setCcDebugRequestBody()  : static
setCcDebugResponseBody()  : static
setCcDebugResponseSerialized()  : static
setCcExpMonth()  : static
setCcExpYear()  : static
setCcLast4()  : static
setCcNumber()  : static
setCcNumberEnc()  : static
setCcOwner()  : static
setCcSsIssue()  : static
setCcSsStartMonth()  : static
setCcSsStartYear()  : static
setCcStatus()  : static
setCcStatusDescription()  : static
setCcTransId()  : static
setCcType()  : static
setCreatedAt()  : static
setCreatedCreditmemo()  : static
setCreatedInvoice()  : static
setCreatedTransaction()  : static
setCreditmemo()  : static
setCustomerPaymentId()  : static
setCybersourceToken()  : static
setData()  : $this
Overwrite data in the object.
setDataChanges()  : $this
Clears data changes status
setDataUsingMethod()  : $this
Set object data with calling setter method
setEcheckAccountName()  : static
setEcheckAccountType()  : static
setEcheckBankName()  : static
setEcheckRoutingNumber()  : static
setEcheckType()  : static
setFlo2cashAccountId()  : static
setId()  : $this
Declare model object identifier value
setIdealIssuerId()  : static
setIdealIssuerTitle()  : static
setIdealTransactionChecked()  : static
setIdFieldName()  : $this
set name of object id field
setInvoice()  : self
setIsFraudDetected()  : static
setLastTransId()  : static
setMessage()  : static
setMethod()  : static
setMethodInstance()  : static
setOrder()  : $this
Declare order model object
setOrigData()  : $this
Initialize object original data
setParentId()  : static
setParentTransactionId()  : static
setPayboxQuestionNumber()  : static
setPayboxRequestNumber()  : static
setPoNumber()  : static
setProtectionEligibility()  : static
setQuotePaymentId()  : static
setRefundTransactionId()  : static
setShippingAmount()  : static
setShippingCaptured()  : static
setShippingRefunded()  : static
setShouldCloseParentTransaction()  : static
setStoreId()  : static
setTransactionAdditionalInfo()  : mixed
Additional transaction info setter
setTransactionId()  : static
setUpdatedAt()  : static
setVoidTransactionId()  : static
toArray()  : array<string|int, mixed>
Public wrapper for __toArray
toJson()  : string
Public wrapper for __toJson
toString()  : string
Public wrapper for __toString
toXml()  : string
Public wrapper for __toXml
unsAdditionalInformation()  : $this
Unsetter for entire additional_information value or one of its element by key
unsetData()  : $this
Unset data from the object.
unsetOldData()  : $this
Unset old fields data from the object.
unsTransactionId()  : $this
void()  : $this
Void payment online
__toJson()  : string
Convert object attributes to JSON
__toXml()  : string
Convert object attributes to XML
_addFullNames()  : mixed
_addTransaction()  : null|Mage_Sales_Model_Order_Payment_Transaction|void
Create transaction, prepare its insertion into hierarchy and add its information to payment and comments
_afterDelete()  : $this
Processing object after delete data
_afterDeleteCommit()  : $this
Processing manipulation after main transaction commit
_afterLoad()  : $this
Processing object after load data
_afterSave()  : $this
Processing object after save data
_appendTransactionToMessage()  : string
Append transaction ID (if any) message to the specified message
_authorize()  : $this
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
_beforeDelete()  : $this
Processing object before delete data
_beforeLoad()  : $this
Processing object before load data
_beforeSave()  : $this
Before object save manipulations
_camelize()  : string
_clearData()  : $this
Clearing object's data
_clearReferences()  : $this
Clearing cyclic references
_construct()  : void
Internal constructor not depended on params. Can be used for object initialization
_createBillingAgreement()  : mixed
Generate billing agreement object if there is billing agreement data Adds it to order as related object
_formatAmount()  : string|float
Round up and cast specified amount to float or string
_formatPrice()  : string
Format price with currency sign
_generateTransactionId()  : mixed
Update transaction ids for further processing If no transactions were set before invoking, may generate an "offline" transaction id
_getData()  : mixed
Get value from _data array without parse key
_getEventData()  : array<string|int, mixed>
Get array of objects transferred to default events processing
_getInvoiceForTransactionId()  : Mage_Sales_Model_Order_Invoice|false
Return invoice model for transaction
_hasModelChanged()  : bool
Check whether model has changed data.
_init()  : mixed
Standard model initialization
_initAdditionalInformation()  : mixed
Make sure _additionalInformation is an array
_initOldFieldsMap()  : mixed
Inits mapping array of object's previously used fields to new fields.
_invoice()  : Mage_Sales_Model_Order_Invoice
Create new invoice with maximum qty for invoice for each item register this invoice and capture
_isCaptureFinal()  : bool
Decide whether authorization transaction may close (if the amount to capture will cover entire order)
_isSameCurrency()  : bool
Check whether payment currency corresponds to order currency
_isTransactionExists()  : bool
Check transaction existence by specified transaction id
_lookupTransaction()  : Mage_Sales_Model_Order_Payment_Transaction|false
Find one transaction by ID or type
_order()  : $this
Order payment either online Updates transactions hierarchy, if required Prevents transaction double processing Updates payment totals, updates order status and adds proper comments
_prepareArray()  : array<string|int, mixed>
Set required array elements
_prepareSyncFieldsMap()  : $this
Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.
_prependMessage()  : string|Mage_Sales_Model_Order_Status_History
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
_protectFromNonAdmin()  : mixed
Safeguard func that will check, if we are in admin area
_setResourceModel()  : mixed
Set resource names
_underscore()  : string
Converts field names for setters and getters
_updateTotals()  : mixed
Totals updater utility method Updates self totals by keys in data ['key' => $delta]
_void()  : $this
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 the amount void amount, for informational purposes.

Constants

REVIEW_ACTION_ACCEPT

Actions for payment when it triggered review state:

public mixed REVIEW_ACTION_ACCEPT = 'accept'

Accept action

REVIEW_ACTION_DENY

Deny action

public mixed REVIEW_ACTION_DENY = 'deny'

REVIEW_ACTION_UPDATE

Update action

public mixed REVIEW_ACTION_UPDATE = 'update'

Properties

$_additionalInformation

Additional information container

protected array<string|int, mixed>|int $_additionalInformation = -1

$_cacheTag

Model cache tag for clear cache in after save and after delete

protected string|bool|array<string|int, mixed> $_cacheTag = \false

When you use true - all cache will be clean

$_canVoidLookup

Whether can void

protected bool|null $_canVoidLookup = \null

$_data

Object attributes

protected array<string|int, mixed>|null $_data = []

$_dataSaveAllowed

Flag which can stop data saving after before save Can be used for next sequence: we check data in _beforeSave, if data are not valid - we can set this flag to false value and save process will be stopped

protected bool $_dataSaveAllowed = \true

$_dirty

protected array<string|int, mixed> $_dirty

$_eventObject

protected string $_eventObject = 'payment'
Attributes
#[Override]

$_eventPrefix

protected string $_eventPrefix = 'sales_order_payment'
Attributes
#[Override]

$_hasDataChanges

Data changes flag (true after setData|unsetData call)

protected bool $_hasDataChanges = false

$_idFieldName

Name of object id field

protected string $_idFieldName = null

$_isDeleted

Object delete flag

protected bool $_isDeleted = false

$_isObjectNew

Flag which allow detect object state: is it new object (without id) or existing one (with id)

protected bool|null $_isObjectNew = \null

$_oldFieldsMap

Map short fields names to its full names

protected array<string|int, mixed> $_oldFieldsMap = []

$_origData

Original data that was loaded

protected array<string|int, mixed>|null $_origData

$_resourceCollectionName

Name of the resource collection model

protected string $_resourceCollectionName

$_resourceName

Name of the resource model

protected string $_resourceName

$_syncFieldsMap

Map of fields to sync to other fields upon changing their data

protected mixed $_syncFieldsMap = []

$_transactionAdditionalInfo

Transaction addditional information container

protected array<string|int, mixed> $_transactionAdditionalInfo = []

$_transactionsLookup

Transactions registry to spare resource calls [txn_id => sales/order_payment_transaction]

protected array<string|int, mixed> $_transactionsLookup = []

$_underscoreCache

Setter/Getter underscore transformation cache

protected static array<string|int, mixed> $_underscoreCache = []

Methods

__call()

Set/Get attribute wrapper

public __call(string $method, array<string|int, mixed> $args) : mixed
Parameters
$method : string
$args : array<string|int, mixed>

__construct()

Constructor

public __construct() : mixed

By default, is looking for first argument as array and assigns it as object attributes This behaviour may change in child classes

__get()

Attribute getter (deprecated)

public __get(string $var) : mixed
Parameters
$var : string

__set()

Attribute setter (deprecated)

public __set(string $var, mixed $value) : mixed
Parameters
$var : string
$value : mixed

__toArray()

Convert object attributes to array

public __toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

Return values
array<string|int, mixed>

accept()

Accept online a payment that is in review state

public accept() : $this
Return values
$this

addData()

Add data to the object.

public addData(array<string|int, mixed> $arr) : $this

Retains previous data in the object.

Parameters
$arr : array<string|int, mixed>
Return values
$this

afterCommitCallback()

Callback function which called after transaction commit in resource model

public afterCommitCallback() : $this
Return values
$this

afterLoad()

Object after load processing. Implemented as public interface for supporting objects after load in collections

public afterLoad() : $this
Return values
$this

authorize()

Public access to _authorize method

public authorize(bool $isOnline, float $amount) : $this
Parameters
$isOnline : bool
$amount : float
Return values
$this

canCapture()

Check order payment capture action availability

public canCapture() : bool
Return values
bool

canCapturePartial()

Check whether partial capture could be done

public canCapturePartial() : bool
Return values
bool

cancel()

Order cancellation hook for payment method instance Adds void transaction if needed

public cancel() : $this
Return values
$this

canFetchTransactionInfo()

Check whether fetching info of transaction could be done

public canFetchTransactionInfo() : bool
Return values
bool

canRefund()

Check whether refund could be done

public canRefund() : bool
Return values
bool

canRefundPartialPerInvoice()

Check whether partial refund could be done

public canRefundPartialPerInvoice() : bool
Return values
bool

canReviewPayment()

Check order payment review availability

public canReviewPayment() : bool
Return values
bool

capture()

Capture the payment online Requires an invoice. If there is no invoice specified, will automatically prepare an invoice for order Updates transactions hierarchy, if required Updates payment totals, updates order status and adds proper comments

public capture(Mage_Sales_Model_Order_Invoice|null $invoice) : $this

TODO: eliminate logic duplication with registerCaptureNotification()

Parameters
$invoice : Mage_Sales_Model_Order_Invoice|null
Tags
throws
Mage_Core_Exception
Return values
$this

cleanModelCache()

Remove model object related cache

public cleanModelCache() : $this
Return values
$this

clearInstance()

Clearing object for correct deleting by garbage collector

public final clearInstance() : $this
Return values
$this

dataHasChangedFor()

Compare object data with original data

public dataHasChangedFor(string $field) : bool
Parameters
$field : string
Return values
bool

debug()

Present object data as string in debug mode

public debug([mixed $data = null ][, array<string|int, mixed> &$objects = [] ]) : string|array<string|int, mixed>
Parameters
$data : mixed = null
$objects : array<string|int, mixed> = []
Return values
string|array<string|int, mixed>

decrypt()

Decrypt data

public decrypt(string $data) : string
Parameters
$data : string
Return values
string

delete()

Delete object from database

public delete() : $this
Tags
throws
Throwable
Return values
$this

deny()

Accept order with payment method instance

public deny() : $this
Return values
$this

encrypt()

Encrypt data

public encrypt(string $data) : string
Parameters
$data : string
Return values
string

flagDirty()

public flagDirty(string $field[, bool $flag = true ]) : $this
Parameters
$field : string
$flag : bool = true
Return values
$this

getAccountStatus()

public getAccountStatus() : string|null
Return values
string|null

getAdditionalData()

public getAdditionalData() : string|null
Return values
string|null

getAdditionalInformation()

Getter for entire additional_information value or one of its element by key

public getAdditionalInformation([string $key = null ]) : array<string|int, mixed>|null|mixed
Parameters
$key : string = null
Return values
array<string|int, mixed>|null|mixed

getAddressStatus()

public getAddressStatus() : string|null
Return values
string|null

getAmountAuthorized()

public getAmountAuthorized() : float|null
Return values
float|null

getAmountCanceled()

public getAmountCanceled() : float|null
Return values
float|null

getAmountOrdered()

public getAmountOrdered() : float|null
Return values
float|null

getAmountPaid()

public getAmountPaid() : float|null
Return values
float|null

getAmountRefunded()

public getAmountRefunded() : float|null
Return values
float|null

getAnetTransMethod()

public getAnetTransMethod() : string|null
Return values
string|null

getBaseAmountAuthorized()

public getBaseAmountAuthorized() : float|null
Return values
float|null

getBaseAmountCanceled()

public getBaseAmountCanceled() : float|null
Return values
float|null

getBaseAmountOrdered()

public getBaseAmountOrdered() : float|null
Return values
float|null

getBaseAmountPaid()

public getBaseAmountPaid() : float|null
Return values
float|null

getBaseAmountPaidOnline()

public getBaseAmountPaidOnline() : float|null
Return values
float|null

getBaseAmountRefunded()

public getBaseAmountRefunded() : float|null
Return values
float|null

getBaseAmountRefundedOnline()

public getBaseAmountRefundedOnline() : float|null
Return values
float|null

getBaseShippingAmount()

public getBaseShippingAmount() : float|null
Return values
float|null

getBaseShippingCaptured()

public getBaseShippingCaptured() : float|null
Return values
float|null

getBaseShippingRefunded()

public getBaseShippingRefunded() : float|null
Return values
float|null

getBillingAgreementData()

public getBillingAgreementData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getCacheIdTags()

Get cache tags associated with object id

public getCacheIdTags() : array<string|int, mixed>|false
Return values
array<string|int, mixed>|false

getCacheTags()

Get list of cache tags applied to model object.

public getCacheTags() : array<string|int, mixed>|false

Return false if cache tags are not supported by model

Return values
array<string|int, mixed>|false

getCcApproval()

public getCcApproval() : string|null
Return values
string|null

getCcAvsStatus()

public getCcAvsStatus() : string|null
Return values
string|null

getCcCid()

public getCcCid() : string|null
Return values
string|null

getCcCidEnc()

public getCcCidEnc() : string|null
Return values
string|null

getCcCidStatus()

public getCcCidStatus() : string|null
Return values
string|null

getCcDebugRequestBody()

public getCcDebugRequestBody() : string|null
Return values
string|null

getCcDebugResponseBody()

public getCcDebugResponseBody() : string|null
Return values
string|null

getCcDebugResponseSerialized()

public getCcDebugResponseSerialized() : string|null
Return values
string|null

getCcExpMonth()

public getCcExpMonth() : string|null
Return values
string|null

getCcExpYear()

public getCcExpYear() : string|null
Return values
string|null

getCcLast4()

public getCcLast4() : string|null
Return values
string|null

getCcNumber()

public getCcNumber() : string|null
Return values
string|null

getCcNumberEnc()

public getCcNumberEnc() : string|null
Return values
string|null

getCcOwner()

public getCcOwner() : string|null
Return values
string|null

getCcSsIssue()

public getCcSsIssue() : string|null
Return values
string|null

getCcSsStartMonth()

public getCcSsStartMonth() : string|null
Return values
string|null

getCcSsStartYear()

public getCcSsStartYear() : string|null
Return values
string|null

getCcStatus()

public getCcStatus() : string|null
Return values
string|null

getCcStatusDescription()

public getCcStatusDescription() : string|null
Return values
string|null

getCcTransId()

public getCcTransId() : string|null
Return values
string|null

getCcType()

public getCcType() : string|null
Return values
string|null

getCreatedAt()

public getCreatedAt() : string|null
Return values
string|null

getCurrencyCode()

public getCurrencyCode() : string|null
Return values
string|null

getCustomerPaymentId()

public getCustomerPaymentId() : int|null
Return values
int|null

getCybersourceToken()

public getCybersourceToken() : string|null
Return values
string|null

getData()

Object data getter

public getData([mixed $key = '' ][, mixed $index = null ]) : mixed

If $key is not defined will return all the data as an array. Otherwise, it will return value of the element specified by $key. It is possible to use keys like a/b/c for access nested array data

If $index is specified it will assume that attribute data is an array and retrieve corresponding member. If data is the string - it will be explode by new line character and converted to array.

Parameters
$key : mixed = ''
$index : mixed = null
Attributes
#[Override]

getDataByKey()

Get object data by particular key

public getDataByKey(string $key) : mixed
Parameters
$key : string

getDataByPath()

Get object data by path

public getDataByPath(string $path) : mixed

Method consider the path as chain of keys: a/b/c => ['a']['b']['c']

Parameters
$path : string

getDataSetDefault()

Fast get data or set default if value is not available

public getDataSetDefault(string $key, mixed $default) : mixed
Parameters
$key : string
$default : mixed

getDataUsingMethod()

Get object data by key with calling getter method

public getDataUsingMethod(string $key[, mixed $args = null ]) : mixed
Parameters
$key : string
$args : mixed = null

getEcheckAccountName()

public getEcheckAccountName() : string|null
Return values
string|null

getEcheckAccountType()

public getEcheckAccountType() : string|null
Return values
string|null

getEcheckBankName()

public getEcheckBankName() : string|null
Return values
string|null

getEcheckRoutingNumber()

public getEcheckRoutingNumber() : string|null
Return values
string|null

getEcheckType()

public getEcheckType() : string|null
Return values
string|null

getEntityId()

public getEntityId() : int
Return values
int

getFlo2cashAccountId()

public getFlo2cashAccountId() : string|null
Return values
string|null

getForcedState()

public getForcedState() : string|null
Return values
string|null

getId()

Retrieve model object identifier

public getId() : int|string|null
Attributes
#[Override]
Return values
int|string|null

getIdealIssuerId()

public getIdealIssuerId() : string|null
Return values
string|null

getIdealIssuerTitle()

public getIdealIssuerTitle() : string|null
Return values
string|null

getIdealTransactionChecked()

public getIdealTransactionChecked() : int|null
Return values
int|null

getIdFieldName()

Retrieve identifier field name for model

public getIdFieldName() : string
Attributes
#[Override]
Return values
string

getIncrementId()

public getIncrementId() : string|null
Return values
string|null

getIsFraudDetected()

public getIsFraudDetected() : bool|null
Return values
bool|null

getIsTransactionApproved()

public getIsTransactionApproved() : bool|null
Return values
bool|null

getIsTransactionClosed()

public getIsTransactionClosed() : bool|null
Return values
bool|null

getIsTransactionDenied()

public getIsTransactionDenied() : bool|null
Return values
bool|null

getIsTransactionPending()

public getIsTransactionPending() : bool|null
Return values
bool|null

getLastTransId()

public getLastTransId() : string|null
Return values
string|null

getMessage()

public getMessage() : string|null
Return values
string|null

getMethod()

public getMethod() : string|null
Return values
string|null

getNotificationResult()

public getNotificationResult() : bool|null
Return values
bool|null

getOrigData()

Get object loaded data (original data)

public getOrigData([string $key = null ]) : mixed
Parameters
$key : string = null

getParentId()

public getParentId() : int|null
Return values
int|null

getParentTransactionId()

public getParentTransactionId() : string|null
Return values
string|null

getPayboxQuestionNumber()

public getPayboxQuestionNumber() : string|null
Return values
string|null

getPayboxRequestNumber()

public getPayboxRequestNumber() : string|null
Return values
string|null

getPoNumber()

public getPoNumber() : string|null
Return values
string|null

getProtectionEligibility()

public getProtectionEligibility() : string|null
Return values
string|null

getQuotePaymentId()

public getQuotePaymentId() : int|null
Return values
int|null

getResourceName()

Retrieve model resource name

public getResourceName() : string
Return values
string

getShippingAmount()

public getShippingAmount() : float|null
Return values
float|null

getShippingCaptured()

public getShippingCaptured() : float|null
Return values
float|null

getShippingRefunded()

public getShippingRefunded() : float|null
Return values
float|null

getShouldCloseParentTransaction()

public getShouldCloseParentTransaction() : bool|null
Return values
bool|null

getSkipOrderProcessing()

public getSkipOrderProcessing() : bool|null
Return values
bool|null

getSkipTransactionCreation()

public getSkipTransactionCreation() : bool|null
Return values
bool|null

getStoreId()

public getStoreId() : int|null
Return values
int|null

getTransactionAdditionalInfo()

Additional transaction info getter

public getTransactionAdditionalInfo([string $key = null ]) : mixed
Parameters
$key : string = null

getTransactionId()

public getTransactionId() : string|null
Return values
string|null

hasAdditionalInformation()

Check whether there is additional information by specified key

public hasAdditionalInformation([string $key = null ]) : bool
Parameters
$key : string = null
Return values
bool

hasData()

If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.

public hasData([string $key = '' ]) : bool
Parameters
$key : string = ''
Return values
bool

hasDataChanges()

Get data change status

public hasDataChanges() : bool
Return values
bool

hasErrors()

public hasErrors() : bool
Return values
bool

hasForcedState()

public hasForcedState() : bool
Return values
bool

hasIsTransactionClosed()

public hasIsTransactionClosed() : bool
Return values
bool

hasMessage()

public hasMessage() : bool
Return values
bool

hasMethodInstance()

public hasMethodInstance() : bool
Return values
bool

isDeleted()

Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value

public isDeleted([bool $isDeleted = null ]) : bool
Parameters
$isDeleted : bool = null
Return values
bool

isDirty()

public isDirty([string $field = null ]) : bool
Parameters
$field : string = null
Return values
bool

isEmpty()

checks whether the object is empty

public isEmpty() : bool
Return values
bool

isModuleEnabled()

public isModuleEnabled(string $moduleName[, string $helperAlias = 'core' ]) : bool
Parameters
$moduleName : string
$helperAlias : string = 'core'
Return values
bool

isObjectNew()

Check object state (true - if it is object without id on object just created) This method can help detect if object just created in _afterSave method problem is what in after save object has id and we can't detect what object was created in this transaction

public isObjectNew([bool $flag = null ]) : bool
Parameters
$flag : bool = null
Return values
bool

jsonSerialize()

Implementation of JsonSerializable::jsonSerialize()

public jsonSerialize() : array<string|int, mixed>

Prepares the object data for JSON serialization. Returns all object data as an array, with special handling for nested DataObject instances:

  • If a nested DataObject has a custom jsonSerialize() implementation, it's preserved as-is
  • If a nested DataObject has a custom toJson() method, it's converted to JSON string
  • If a nested DataObject uses only the base implementations, it's excluded from output

This prevents infinite recursion and circular references when serializing object hierarchies.

Attributes
#[Override]
Return values
array<string|int, mixed>

load()

Load object data

public load(string|null|int $id[, string|null $field = null ]) : $this
Parameters
$id : string|null|int
$field : string|null = null
Return values
$this

place()

Authorize or authorize and capture payment on gateway, if applicable This method is supposed to be called only when order is placed

public place() : $this
Return values
$this

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 refund(Mage_Sales_Model_Order_Creditmemo $creditmemo) : $this
Parameters
$creditmemo : Mage_Sales_Model_Order_Creditmemo
Return values
$this

registerAuthorizationNotification()

Process authorization notification

public registerAuthorizationNotification(float $amount) : $this
Parameters
$amount : float
Tags
see
self::_authorize()
Return values
$this

registerCaptureNotification()

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 registerCaptureNotification(float $amount[, bool $skipFraudDetection = false ]) : $this

TODO: eliminate logic duplication with capture()

Parameters
$amount : float
$skipFraudDetection : bool = false
Return values
$this

registerPaymentReviewAction()

Perform the payment review action: either initiated by merchant or by a notification

public registerPaymentReviewAction(string $action, bool $isOnline) : $this

Sets order to processing state and optionally approves invoice or cancels the order

Parameters
$action : string
$isOnline : bool
Return values
$this

registerRefundNotification()

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 then we should create a creditmemo from invoice and also refund it offline TODO: implement logic of chargebacks reimbursements (via negative amount)

public registerRefundNotification(float $amount) : $this
Parameters
$amount : float
Return values
$this

registerVoidNotification()

Process void notification

public registerVoidNotification([float $amount = null ]) : $this
Parameters
$amount : float = null
Tags
see
self::_void()
Return values
$this

resetTransactionAdditionalInfo()

Reset transaction additional info property

public resetTransactionAdditionalInfo() : $this
Return values
$this

save()

Save object data

public save() : $this
Tags
throws
Throwable
Return values
$this

serialize()

serialize object attributes

public serialize([array<string|int, mixed> $attributes = [] ][, string $valueSeparator = '=' ][, string $fieldSeparator = ' ' ][, string $quote = '"' ]) : string
Parameters
$attributes : array<string|int, mixed> = []
$valueSeparator : string = '='
$fieldSeparator : string = ' '
$quote : string = '"'
Return values
string

setAccountStatus()

public setAccountStatus(string|null $value) : static
Parameters
$value : string|null
Return values
static

setAdditionalData()

public setAdditionalData(string|null $value) : static
Parameters
$value : string|null
Return values
static

setAdditionalInformation()

Additional information setter Updates data inside the 'additional_information' array or all 'additional_information' if key is data array

public setAdditionalInformation(string|array<string|int, mixed> $key[, mixed $value = null ]) : $this
Parameters
$key : string|array<string|int, mixed>
$value : mixed = null
Tags
throws
Mage_Core_Exception
Return values
$this

setAddressStatus()

public setAddressStatus(string|null $value) : static
Parameters
$value : string|null
Return values
static

setAmountAuthorized()

public setAmountAuthorized(float|null $value) : static
Parameters
$value : float|null
Return values
static

setAmountCanceled()

public setAmountCanceled(float|null $value) : static
Parameters
$value : float|null
Return values
static

setAmountOrdered()

public setAmountOrdered(float|null $value) : static
Parameters
$value : float|null
Return values
static

setAmountPaid()

public setAmountPaid(float|null $value) : static
Parameters
$value : float|null
Return values
static

setAmountRefunded()

public setAmountRefunded(float|null $value) : static
Parameters
$value : float|null
Return values
static

setAnetTransMethod()

public setAnetTransMethod(string|null $value) : static
Parameters
$value : string|null
Return values
static

setBaseAmountAuthorized()

public setBaseAmountAuthorized(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseAmountCanceled()

public setBaseAmountCanceled(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseAmountOrdered()

public setBaseAmountOrdered(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseAmountPaid()

public setBaseAmountPaid(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseAmountPaidOnline()

public setBaseAmountPaidOnline(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseAmountRefunded()

public setBaseAmountRefunded(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseAmountRefundedOnline()

public setBaseAmountRefundedOnline(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseShippingAmount()

public setBaseShippingAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseShippingCaptured()

public setBaseShippingCaptured(float|null $value) : static
Parameters
$value : float|null
Return values
static

setBaseShippingRefunded()

public setBaseShippingRefunded(float|null $value) : static
Parameters
$value : float|null
Return values
static

setCcApproval()

public setCcApproval(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcAvsStatus()

public setCcAvsStatus(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcCid()

public setCcCid(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcCidStatus()

public setCcCidStatus(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcDebugRequestBody()

public setCcDebugRequestBody(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcDebugResponseBody()

public setCcDebugResponseBody(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcDebugResponseSerialized()

public setCcDebugResponseSerialized(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcExpMonth()

public setCcExpMonth(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcExpYear()

public setCcExpYear(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcLast4()

public setCcLast4(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcNumber()

public setCcNumber(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcNumberEnc()

public setCcNumberEnc(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcOwner()

public setCcOwner(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcSsIssue()

public setCcSsIssue(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcSsStartMonth()

public setCcSsStartMonth(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcSsStartYear()

public setCcSsStartYear(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcStatus()

public setCcStatus(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcStatusDescription()

public setCcStatusDescription(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcTransId()

public setCcTransId(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCcType()

public setCcType(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCreatedAt()

public setCreatedAt(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCustomerPaymentId()

public setCustomerPaymentId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setCybersourceToken()

public setCybersourceToken(string|null $value) : static
Parameters
$value : string|null
Return values
static

setData()

Overwrite data in the object.

public setData(string|array<string|int, mixed> $key[, mixed $value = null ]) : $this

$key can be string or array. If $key is string, the attribute value will be overwritten by $value

If $key is an array, it will overwrite all the data in the object.

Parameters
$key : string|array<string|int, mixed>
$value : mixed = null
Return values
$this

setDataChanges()

Clears data changes status

public setDataChanges(bool $value) : $this
Parameters
$value : bool
Return values
$this

setDataUsingMethod()

Set object data with calling setter method

public setDataUsingMethod(string $key[, mixed $args = [] ]) : $this
Parameters
$key : string
$args : mixed = []
Return values
$this

setEcheckAccountName()

public setEcheckAccountName(string|null $value) : static
Parameters
$value : string|null
Return values
static

setEcheckAccountType()

public setEcheckAccountType(string|null $value) : static
Parameters
$value : string|null
Return values
static

setEcheckBankName()

public setEcheckBankName(string|null $value) : static
Parameters
$value : string|null
Return values
static

setEcheckRoutingNumber()

public setEcheckRoutingNumber(string|null $value) : static
Parameters
$value : string|null
Return values
static

setEcheckType()

public setEcheckType(string|null $value) : static
Parameters
$value : string|null
Return values
static

setFlo2cashAccountId()

public setFlo2cashAccountId(string|null $value) : static
Parameters
$value : string|null
Return values
static

setId()

Declare model object identifier value

public setId(mixed $id) : $this
Parameters
$id : mixed
Attributes
#[Override]
Return values
$this

setIdealIssuerId()

public setIdealIssuerId(string|null $value) : static
Parameters
$value : string|null
Return values
static

setIdealIssuerTitle()

public setIdealIssuerTitle(string|null $value) : static
Parameters
$value : string|null
Return values
static

setIdealTransactionChecked()

public setIdealTransactionChecked(int|null $value) : static
Parameters
$value : int|null
Return values
static

setIdFieldName()

set name of object id field

public setIdFieldName(string $name) : $this
Parameters
$name : string
Return values
$this

setIsFraudDetected()

public setIsFraudDetected([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setLastTransId()

public setLastTransId(string|null $value) : static
Parameters
$value : string|null
Return values
static

setMessage()

public setMessage(string|null $value) : static
Parameters
$value : string|null
Return values
static

setMethod()

public setMethod(string|null $value) : static
Parameters
$value : string|null
Return values
static

setOrigData()

Initialize object original data

public setOrigData([string $key = null ][, mixed $data = null ]) : $this
Parameters
$key : string = null
$data : mixed = null
Return values
$this

setParentId()

public setParentId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setParentTransactionId()

public setParentTransactionId(string|null $value) : static
Parameters
$value : string|null
Return values
static

setPayboxQuestionNumber()

public setPayboxQuestionNumber(string|null $value) : static
Parameters
$value : string|null
Return values
static

setPayboxRequestNumber()

public setPayboxRequestNumber(string|null $value) : static
Parameters
$value : string|null
Return values
static

setPoNumber()

public setPoNumber(string|null $value) : static
Parameters
$value : string|null
Return values
static

setProtectionEligibility()

public setProtectionEligibility(string|null $value) : static
Parameters
$value : string|null
Return values
static

setQuotePaymentId()

public setQuotePaymentId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setRefundTransactionId()

public setRefundTransactionId(string|null $value) : static
Parameters
$value : string|null
Return values
static

setShippingAmount()

public setShippingAmount(float|null $value) : static
Parameters
$value : float|null
Return values
static

setShippingCaptured()

public setShippingCaptured(float|null $value) : static
Parameters
$value : float|null
Return values
static

setShippingRefunded()

public setShippingRefunded(float|null $value) : static
Parameters
$value : float|null
Return values
static

setShouldCloseParentTransaction()

public setShouldCloseParentTransaction([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setStoreId()

public setStoreId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setTransactionAdditionalInfo()

Additional transaction info setter

public setTransactionAdditionalInfo(string $key, string $value) : mixed
Parameters
$key : string
$value : string

setTransactionId()

public setTransactionId(string|null $value) : static
Parameters
$value : string|null
Return values
static

setUpdatedAt()

public setUpdatedAt(string|null $value) : static
Parameters
$value : string|null
Return values
static

setVoidTransactionId()

public setVoidTransactionId(string|null $value) : static
Parameters
$value : string|null
Return values
static

toArray()

Public wrapper for __toArray

public toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
$arrAttributes : array<string|int, mixed> = []
Return values
array<string|int, mixed>

toJson()

Public wrapper for __toJson

public toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []
Return values
string

toString()

Public wrapper for __toString

public toString([string $format = '' ]) : string

Will use $format as an template and substitute {{key}} for attributes

Parameters
$format : string = ''
Return values
string

toXml()

Public wrapper for __toXml

public toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []
$rootName : string = 'item'
$addOpenTag : bool = false
$addCdata : bool = true
Return values
string

unsAdditionalInformation()

Unsetter for entire additional_information value or one of its element by key

public unsAdditionalInformation([string $key = null ]) : $this
Parameters
$key : string = null
Return values
$this

unsetData()

Unset data from the object.

public unsetData([string $key = null ]) : $this

$key can be a string only. Array will be ignored.

Parameters
$key : string = null
Return values
$this

unsetOldData()

Unset old fields data from the object.

public unsetOldData([string $key = null ]) : $this

$key can be a string only. Array will be ignored.

Parameters
$key : string = null
Return values
$this

unsTransactionId()

public unsTransactionId() : $this
Return values
$this

void()

Void payment online

public void(DataObject $document) : $this
Parameters
$document : DataObject
Tags
see
self::_void()
Return values
$this

__toJson()

Convert object attributes to JSON

protected __toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

Return values
string

__toXml()

Convert object attributes to XML

protected __toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

$rootName : string = 'item'

name of the root element

$addOpenTag : bool = false
$addCdata : bool = true
Return values
string

_addFullNames()

protected _addFullNames() : mixed

_addTransaction()

Create transaction, prepare its insertion into hierarchy and add its information to payment and comments

protected _addTransaction(string $type[, Mage_Sales_Model_Abstract $salesDocument = null ][, bool $failsafe = false ]) : null|Mage_Sales_Model_Order_Payment_Transaction|void

To add transactions and related information, the following information should be set to payment before processing:

  • transaction_id
  • is_transaction_closed (optional) - whether transaction should be closed or open (closed by default)
  • parent_transaction_id (optional)
  • should_close_parent_transaction (optional) - whether to close parent transaction (closed by default)

If the sales document is specified, it will be linked to the transaction as related for future usage. Currently transaction ID is set into the sales object This method writes the added transaction ID into last_trans_id field of the payment object

To make sure transaction object won't cause trouble before saving, use $failsafe = true

Parameters
$type : string
$salesDocument : Mage_Sales_Model_Abstract = null
$failsafe : bool = false
Return values
null|Mage_Sales_Model_Order_Payment_Transaction|void

_afterDelete()

Processing object after delete data

protected _afterDelete() : $this
Return values
$this

_afterDeleteCommit()

Processing manipulation after main transaction commit

protected _afterDeleteCommit() : $this
Return values
$this

_afterLoad()

Processing object after load data

protected _afterLoad() : $this
Return values
$this

_afterSave()

Processing object after save data

protected _afterSave() : $this
Return values
$this

_authorize()

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

protected _authorize(bool $isOnline, float $amount) : $this
Parameters
$isOnline : bool
$amount : float
Return values
$this

_beforeDelete()

Processing object before delete data

protected _beforeDelete() : $this
Return values
$this

_beforeLoad()

Processing object before load data

protected _beforeLoad(int $id[, string|null $field = null ]) : $this
Parameters
$id : int
$field : string|null = null
Return values
$this

_beforeSave()

Before object save manipulations

protected _beforeSave() : $this
Attributes
#[Override]
Return values
$this

_camelize()

protected _camelize(string $name) : string
Parameters
$name : string
Return values
string

_clearData()

Clearing object's data

protected _clearData() : $this
Return values
$this

_clearReferences()

Clearing cyclic references

protected _clearReferences() : $this
Return values
$this

_construct()

Internal constructor not depended on params. Can be used for object initialization

protected _construct() : void
Attributes
#[Override]

_createBillingAgreement()

Generate billing agreement object if there is billing agreement data Adds it to order as related object

protected _createBillingAgreement() : mixed

_formatAmount()

Round up and cast specified amount to float or string

protected _formatAmount(string|float $amount[, bool $asFloat = false ]) : string|float
Parameters
$amount : string|float
$asFloat : bool = false
Return values
string|float

_formatPrice()

Format price with currency sign

protected _formatPrice(float $amount[, null|string $currency = null ]) : string
Parameters
$amount : float
$currency : null|string = null
Return values
string

_getData()

Get value from _data array without parse key

protected _getData(string $key) : mixed
Parameters
$key : string

_getEventData()

Get array of objects transferred to default events processing

protected _getEventData() : array<string|int, mixed>
Return values
array<string|int, mixed>

_hasModelChanged()

Check whether model has changed data.

protected _hasModelChanged() : bool

Can be overloaded in child classes to perform advanced check whether model needs to be saved e.g. using resourceModel->hasDataChanged() or any other technique

Return values
bool

_init()

Standard model initialization

protected _init(string $resourceModel) : mixed
Parameters
$resourceModel : string

_initAdditionalInformation()

Make sure _additionalInformation is an array

protected _initAdditionalInformation() : mixed

_initOldFieldsMap()

Inits mapping array of object's previously used fields to new fields.

protected _initOldFieldsMap() : mixed

Must be overloaded by descendants to set concrete fields map.

_isCaptureFinal()

Decide whether authorization transaction may close (if the amount to capture will cover entire order)

protected _isCaptureFinal(float $amountToCapture) : bool
Parameters
$amountToCapture : float
Return values
bool

_isSameCurrency()

Check whether payment currency corresponds to order currency

protected _isSameCurrency() : bool
Return values
bool

_isTransactionExists()

Check transaction existence by specified transaction id

protected _isTransactionExists([string $txnId = null ]) : bool
Parameters
$txnId : string = null
Return values
bool

_order()

Order payment either online Updates transactions hierarchy, if required Prevents transaction double processing Updates payment totals, updates order status and adds proper comments

protected _order(float $amount) : $this
Parameters
$amount : float
Return values
$this

_prepareArray()

Set required array elements

protected _prepareArray(array<string|int, mixed> &$arr[, array<string|int, mixed> $elements = [] ]) : array<string|int, mixed>
Parameters
$arr : array<string|int, mixed>
$elements : array<string|int, mixed> = []
Return values
array<string|int, mixed>

_prepareSyncFieldsMap()

Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.

protected _prepareSyncFieldsMap() : $this
Return values
$this

_prependMessage()

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 _prependMessage(string|Mage_Sales_Model_Order_Status_History $messagePrependTo) : string|Mage_Sales_Model_Order_Status_History
Parameters
$messagePrependTo : string|Mage_Sales_Model_Order_Status_History
Return values
string|Mage_Sales_Model_Order_Status_History

_protectFromNonAdmin()

Safeguard func that will check, if we are in admin area

protected _protectFromNonAdmin() : mixed
Tags
throws
Mage_Core_Exception

_setResourceModel()

Set resource names

protected _setResourceModel(string $resourceName[, string|null $resourceCollectionName = null ]) : mixed

If collection name is omitted, resource name will be used with _collection appended

Parameters
$resourceName : string
$resourceCollectionName : string|null = null

_underscore()

Converts field names for setters and getters

protected _underscore(string $name) : string

$this->setMyField($value) === $this->setData('my_field', $value) Uses cache to eliminate unnecessary preg_replace

Parameters
$name : string
Return values
string

_updateTotals()

Totals updater utility method Updates self totals by keys in data ['key' => $delta]

protected _updateTotals(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>

_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 the amount void amount, for informational purposes.

protected _void(bool $isOnline[, float $amount = null ][, string $gatewayCallback = 'void' ]) : $this

Updates payment totals, updates order status and adds proper comments

Parameters
$isOnline : bool
$amount : float = null
$gatewayCallback : string = 'void'
Return values
$this
On this page

Search results