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
$_billingAgreement
Billing agreement instance that may be created during payment processing
protected
Mage_Sales_Model_Billing_Agreement
$_billingAgreement
= \null
$_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
$_invoice
Invoice currently being captured, exposed to gateway methods during capture()
protected
Mage_Sales_Model_Order_Invoice|null
$_invoice
= \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
= []
$_order
Order model object
protected
Mage_Sales_Model_Order
$_order
$_origData
Original data that was loaded
protected
array<string|int, mixed>|null
$_origData
$_resource
Resource model instance
protected
Mage_Core_Model_Resource_Db_Abstract
$_resource
$_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>_getResource()
Get resource instance
public
_getResource() : Mage_Sales_Model_Resource_Order_Payment
Return values
Mage_Sales_Model_Resource_Order_Paymentaccept()
Accept online a payment that is in review state
public
accept() : $this
Return values
$thisaddData()
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
$thisaddTransaction()
Public access to _addTransaction method
public
addTransaction(string $type[, Mage_Sales_Model_Abstract $salesDocument = null ][, bool $failsafe = false ][, string|false $message = false ]) : null|Mage_Sales_Model_Order_Payment_Transaction
Parameters
- $type : string
- $salesDocument : Mage_Sales_Model_Abstract = null
- $failsafe : bool = false
- $message : string|false = false
Return values
null|Mage_Sales_Model_Order_Payment_TransactionafterCommitCallback()
Callback function which called after transaction commit in resource model
public
afterCommitCallback() : $this
Return values
$thisafterLoad()
Object after load processing. Implemented as public interface for supporting objects after load in collections
public
afterLoad() : $this
Return values
$thisauthorize()
Public access to _authorize method
public
authorize(bool $isOnline, float $amount) : $this
Parameters
- $isOnline : bool
- $amount : float
Return values
$thiscanCapture()
Check order payment capture action availability
public
canCapture() : bool
Return values
boolcanCapturePartial()
Check whether partial capture could be done
public
canCapturePartial() : bool
Return values
boolcancel()
Order cancellation hook for payment method instance Adds void transaction if needed
public
cancel() : $this
Return values
$thiscancelCreditmemo()
Cancel a credit memo: subtract its totals from the payment
public
cancelCreditmemo(Mage_Sales_Model_Order_Creditmemo $creditmemo) : $this
Parameters
- $creditmemo : Mage_Sales_Model_Order_Creditmemo
Return values
$thiscancelInvoice()
Cancel specified invoice: update self totals from it
public
cancelInvoice(Mage_Sales_Model_Order_Invoice $invoice) : $this
Parameters
- $invoice : Mage_Sales_Model_Order_Invoice
Return values
$thiscanFetchTransactionInfo()
Check whether fetching info of transaction could be done
public
canFetchTransactionInfo() : bool
Return values
boolcanRefund()
Check whether refund could be done
public
canRefund() : bool
Return values
boolcanRefundPartialPerInvoice()
Check whether partial refund could be done
public
canRefundPartialPerInvoice() : bool
Return values
boolcanReviewPayment()
Check order payment review availability
public
canReviewPayment() : bool
Return values
boolcanVoid()
Check order payment void availability
public
canVoid(DataObject $document) : bool
Parameters
- $document : DataObject
Tags
Return values
boolcapture()
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
Return values
$thiscleanModelCache()
Remove model object related cache
public
cleanModelCache() : $this
Return values
$thisclearInstance()
Clearing object for correct deleting by garbage collector
public
final clearInstance() : $this
Return values
$thisdataHasChangedFor()
Compare object data with original data
public
dataHasChangedFor(string $field) : bool
Parameters
- $field : string
Return values
booldebug()
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
stringdelete()
Delete object from database
public
delete() : $this
Tags
Return values
$thisdeny()
Accept order with payment method instance
public
deny() : $this
Return values
$thisencrypt()
Encrypt data
public
encrypt(string $data) : string
Parameters
- $data : string
Return values
stringflagDirty()
public
flagDirty(string $field[, bool $flag = true ]) : $this
Parameters
- $field : string
- $flag : bool = true
Return values
$thisgetAccountStatus()
public
getAccountStatus() : string|null
Return values
string|nullgetAdditionalData()
public
getAdditionalData() : string|null
Return values
string|nullgetAdditionalInformation()
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|mixedgetAddressStatus()
public
getAddressStatus() : string|null
Return values
string|nullgetAmountAuthorized()
public
getAmountAuthorized() : float|null
Return values
float|nullgetAmountCanceled()
public
getAmountCanceled() : float|null
Return values
float|nullgetAmountOrdered()
public
getAmountOrdered() : float|null
Return values
float|nullgetAmountPaid()
public
getAmountPaid() : float|null
Return values
float|nullgetAmountRefunded()
public
getAmountRefunded() : float|null
Return values
float|nullgetAnetTransMethod()
public
getAnetTransMethod() : string|null
Return values
string|nullgetAuthorizationTransaction()
Lookup an authorization transaction using parent transaction id, if set
public
getAuthorizationTransaction() : Mage_Sales_Model_Order_Payment_Transaction|false
Return values
Mage_Sales_Model_Order_Payment_Transaction|falsegetBaseAmountAuthorized()
public
getBaseAmountAuthorized() : float|null
Return values
float|nullgetBaseAmountCanceled()
public
getBaseAmountCanceled() : float|null
Return values
float|nullgetBaseAmountOrdered()
public
getBaseAmountOrdered() : float|null
Return values
float|nullgetBaseAmountPaid()
public
getBaseAmountPaid() : float|null
Return values
float|nullgetBaseAmountPaidOnline()
public
getBaseAmountPaidOnline() : float|null
Return values
float|nullgetBaseAmountRefunded()
public
getBaseAmountRefunded() : float|null
Return values
float|nullgetBaseAmountRefundedOnline()
public
getBaseAmountRefundedOnline() : float|null
Return values
float|nullgetBaseShippingAmount()
public
getBaseShippingAmount() : float|null
Return values
float|nullgetBaseShippingCaptured()
public
getBaseShippingCaptured() : float|null
Return values
float|nullgetBaseShippingRefunded()
public
getBaseShippingRefunded() : float|null
Return values
float|nullgetBillingAddress()
public
getBillingAddress() : Mage_Customer_Model_Address_Abstract|null
Return values
Mage_Customer_Model_Address_Abstract|nullgetBillingAgreement()
Get the billing agreement, if any
public
getBillingAgreement() : Mage_Sales_Model_Billing_Agreement|null
Return values
Mage_Sales_Model_Billing_Agreement|nullgetBillingAgreementData()
public
getBillingAgreementData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetCacheIdTags()
Get cache tags associated with object id
public
getCacheIdTags() : array<string|int, mixed>|false
Return values
array<string|int, mixed>|falsegetCacheTags()
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>|falsegetCcApproval()
public
getCcApproval() : string|null
Return values
string|nullgetCcAvsStatus()
public
getCcAvsStatus() : string|null
Return values
string|nullgetCcCid()
public
getCcCid() : string|null
Return values
string|nullgetCcCidEnc()
public
getCcCidEnc() : string|null
Return values
string|nullgetCcCidStatus()
public
getCcCidStatus() : string|null
Return values
string|nullgetCcDebugRequestBody()
public
getCcDebugRequestBody() : string|null
Return values
string|nullgetCcDebugResponseBody()
public
getCcDebugResponseBody() : string|null
Return values
string|nullgetCcDebugResponseSerialized()
public
getCcDebugResponseSerialized() : string|null
Return values
string|nullgetCcExpMonth()
public
getCcExpMonth() : string|null
Return values
string|nullgetCcExpYear()
public
getCcExpYear() : string|null
Return values
string|nullgetCcLast4()
public
getCcLast4() : string|null
Return values
string|nullgetCcNumber()
public
getCcNumber() : string|null
Return values
string|nullgetCcNumberEnc()
public
getCcNumberEnc() : string|null
Return values
string|nullgetCcOwner()
public
getCcOwner() : string|null
Return values
string|nullgetCcSsIssue()
public
getCcSsIssue() : string|null
Return values
string|nullgetCcSsStartMonth()
public
getCcSsStartMonth() : string|null
Return values
string|nullgetCcSsStartYear()
public
getCcSsStartYear() : string|null
Return values
string|nullgetCcStatus()
public
getCcStatus() : string|null
Return values
string|nullgetCcStatusDescription()
public
getCcStatusDescription() : string|null
Return values
string|nullgetCcTransId()
public
getCcTransId() : string|null
Return values
string|nullgetCcType()
public
getCcType() : string|null
Return values
string|nullgetCollection()
public
getCollection() : Mage_Sales_Model_Resource_Order_Payment_Collection
Return values
Mage_Sales_Model_Resource_Order_Payment_CollectiongetCreatedAt()
public
getCreatedAt() : string|null
Return values
string|nullgetCurrencyCode()
public
getCurrencyCode() : string|null
Return values
string|nullgetCustomerPaymentId()
public
getCustomerPaymentId() : int|null
Return values
int|nullgetCybersourceToken()
public
getCybersourceToken() : string|null
Return values
string|nullgetData()
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|nullgetEcheckAccountType()
public
getEcheckAccountType() : string|null
Return values
string|nullgetEcheckBankName()
public
getEcheckBankName() : string|null
Return values
string|nullgetEcheckRoutingNumber()
public
getEcheckRoutingNumber() : string|null
Return values
string|nullgetEcheckType()
public
getEcheckType() : string|null
Return values
string|nullgetEntityId()
public
getEntityId() : int
Return values
intgetFlo2cashAccountId()
public
getFlo2cashAccountId() : string|null
Return values
string|nullgetForcedState()
public
getForcedState() : string|null
Return values
string|nullgetId()
Retrieve model object identifier
public
getId() : int|string|null
Attributes
- #[Override]
Return values
int|string|nullgetIdealIssuerId()
public
getIdealIssuerId() : string|null
Return values
string|nullgetIdealIssuerTitle()
public
getIdealIssuerTitle() : string|null
Return values
string|nullgetIdealTransactionChecked()
public
getIdealTransactionChecked() : int|null
Return values
int|nullgetIdFieldName()
Retrieve identifier field name for model
public
getIdFieldName() : string
Attributes
- #[Override]
Return values
stringgetIncrementId()
public
getIncrementId() : string|null
Return values
string|nullgetInvoice()
public
getInvoice() : Mage_Sales_Model_Order_Invoice|null
Return values
Mage_Sales_Model_Order_Invoice|nullgetIsFraudDetected()
public
getIsFraudDetected() : bool|null
Return values
bool|nullgetIsTransactionApproved()
public
getIsTransactionApproved() : bool|null
Return values
bool|nullgetIsTransactionClosed()
public
getIsTransactionClosed() : bool|null
Return values
bool|nullgetIsTransactionDenied()
public
getIsTransactionDenied() : bool|null
Return values
bool|nullgetIsTransactionPending()
public
getIsTransactionPending() : bool|null
Return values
bool|nullgetLastTransId()
public
getLastTransId() : string|null
Return values
string|nullgetMessage()
public
getMessage() : string|null
Return values
string|nullgetMethod()
public
getMethod() : string|null
Return values
string|nullgetMethodInstance()
Retrieve payment method model object
public
getMethodInstance() : Mage_Payment_Model_Method_Abstract
Return values
Mage_Payment_Model_Method_AbstractgetNotificationResult()
public
getNotificationResult() : bool|null
Return values
bool|nullgetOrder()
Retrieve order model object
public
getOrder() : Mage_Sales_Model_Order
Return values
Mage_Sales_Model_OrdergetOrigData()
Get object loaded data (original data)
public
getOrigData([string $key = null ]) : mixed
Parameters
- $key : string = null
getParentId()
public
getParentId() : int|null
Return values
int|nullgetParentTransactionId()
public
getParentTransactionId() : string|null
Return values
string|nullgetPayboxQuestionNumber()
public
getPayboxQuestionNumber() : string|null
Return values
string|nullgetPayboxRequestNumber()
public
getPayboxRequestNumber() : string|null
Return values
string|nullgetPoNumber()
public
getPoNumber() : string|null
Return values
string|nullgetPreparedMessage()
public
getPreparedMessage() : Mage_Sales_Model_Order_Status_History|string|null
Return values
Mage_Sales_Model_Order_Status_History|string|nullgetProtectionEligibility()
public
getProtectionEligibility() : string|null
Return values
string|nullgetQuote()
public
getQuote() : Mage_Sales_Model_Quote
Return values
Mage_Sales_Model_QuotegetQuotePaymentId()
public
getQuotePaymentId() : int|null
Return values
int|nullgetResource()
Retrieve model resource
public
getResource() : Mage_Sales_Model_Resource_Order_Payment
Return values
Mage_Sales_Model_Resource_Order_PaymentgetResourceCollection()
Get collection instance
public
getResourceCollection() : Mage_Core_Model_Resource_Db_Collection_Abstract
Tags
Return values
Mage_Core_Model_Resource_Db_Collection_AbstractgetResourceName()
Retrieve model resource name
public
getResourceName() : string
Return values
stringgetShippingAddress()
public
getShippingAddress() : Mage_Customer_Model_Address_Abstract|null
Return values
Mage_Customer_Model_Address_Abstract|nullgetShippingAmount()
public
getShippingAmount() : float|null
Return values
float|nullgetShippingCaptured()
public
getShippingCaptured() : float|null
Return values
float|nullgetShippingRefunded()
public
getShippingRefunded() : float|null
Return values
float|nullgetShouldCloseParentTransaction()
public
getShouldCloseParentTransaction() : bool|null
Return values
bool|nullgetSkipOrderProcessing()
public
getSkipOrderProcessing() : bool|null
Return values
bool|nullgetSkipTransactionCreation()
public
getSkipTransactionCreation() : bool|null
Return values
bool|nullgetStoreId()
public
getStoreId() : int|null
Return values
int|nullgetTransaction()
Lookup the transaction by id
public
getTransaction(string $transactionId) : Mage_Sales_Model_Order_Payment_Transaction|false
Parameters
- $transactionId : string
Return values
Mage_Sales_Model_Order_Payment_Transaction|falsegetTransactionAdditionalInfo()
Additional transaction info getter
public
getTransactionAdditionalInfo([string $key = null ]) : mixed
Parameters
- $key : string = null
getTransactionId()
public
getTransactionId() : string|null
Return values
string|nullhasAdditionalInformation()
Check whether there is additional information by specified key
public
hasAdditionalInformation([string $key = null ]) : bool
Parameters
- $key : string = null
Return values
boolhasData()
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
boolhasDataChanges()
Get data change status
public
hasDataChanges() : bool
Return values
boolhasErrors()
public
hasErrors() : bool
Return values
boolhasForcedState()
public
hasForcedState() : bool
Return values
boolhasIsTransactionClosed()
public
hasIsTransactionClosed() : bool
Return values
boolhasMessage()
public
hasMessage() : bool
Return values
boolhasMethodInstance()
public
hasMethodInstance() : bool
Return values
boolimportTransactionInfo()
Import details data of specified transaction
public
importTransactionInfo(Mage_Sales_Model_Order_Payment_Transaction $transactionTo) : $this
Parameters
- $transactionTo : Mage_Sales_Model_Order_Payment_Transaction
Return values
$thisisDeleted()
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
boolisDirty()
public
isDirty([string $field = null ]) : bool
Parameters
- $field : string = null
Return values
boolisEmpty()
checks whether the object is empty
public
isEmpty() : bool
Return values
boolisModuleEnabled()
public
isModuleEnabled(string $moduleName[, string $helperAlias = 'core' ]) : bool
Parameters
- $moduleName : string
- $helperAlias : string = 'core'
Return values
boolisObjectNew()
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
booljsonSerialize()
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
$thislookupTransaction()
Find one transaction by ID or type
public
lookupTransaction(string|false $txnId[, string|false $txnType = false ]) : Mage_Sales_Model_Order_Payment_Transaction|false
Parameters
- $txnId : string|false
- $txnType : string|false = false
Return values
Mage_Sales_Model_Order_Payment_Transaction|falseoffsetExists()
Implementation of ArrayAccess::offsetExists()
public
offsetExists(string $offset) : bool
Parameters
- $offset : string
Tags
Attributes
- #[Override]
Return values
booloffsetGet()
Implementation of ArrayAccess::offsetGet()
public
offsetGet(string $offset) : mixed
Parameters
- $offset : string
Tags
Attributes
- #[Override]
- #[ReturnTypeWillChange]
offsetSet()
Implementation of ArrayAccess::offsetSet()
public
offsetSet(string $offset, mixed $value) : void
Parameters
- $offset : string
- $value : mixed
Tags
Attributes
- #[Override]
offsetUnset()
Implementation of ArrayAccess::offsetUnset()
public
offsetUnset(string $offset) : void
Parameters
- $offset : string
Tags
Attributes
- #[Override]
pay()
Register payment fact: update self totals from the invoice
public
pay(Mage_Sales_Model_Order_Invoice $invoice) : $this
Parameters
- $invoice : Mage_Sales_Model_Order_Invoice
Return values
$thisplace()
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
$thisrefund()
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
$thisregisterAuthorizationNotification()
Process authorization notification
public
registerAuthorizationNotification(float $amount) : $this
Parameters
- $amount : float
Tags
Return values
$thisregisterCaptureNotification()
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
$thisregisterPaymentReviewAction()
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
$thisregisterRefundNotification()
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
$thisregisterVoidNotification()
Process void notification
public
registerVoidNotification([float $amount = null ]) : $this
Parameters
- $amount : float = null
Tags
Return values
$thisresetTransactionAdditionalInfo()
Reset transaction additional info property
public
resetTransactionAdditionalInfo() : $this
Return values
$thissave()
Save object data
public
save() : $this
Tags
Return values
$thisserialize()
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
stringsetAccountStatus()
public
setAccountStatus(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetAdditionalData()
public
setAdditionalData(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetAdditionalInformation()
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
Return values
$thissetAddressStatus()
public
setAddressStatus(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetAmountAuthorized()
public
setAmountAuthorized(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetAmountCanceled()
public
setAmountCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetAmountOrdered()
public
setAmountOrdered(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetAmountPaid()
public
setAmountPaid(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetAmountRefunded()
public
setAmountRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetAnetTransMethod()
public
setAnetTransMethod(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetAttribute()
public
setAttribute(Mage_Eav_Model_Entity_Attribute_Abstract $value) : $this
Parameters
Return values
$thissetBaseAmountAuthorized()
public
setBaseAmountAuthorized(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseAmountCanceled()
public
setBaseAmountCanceled(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseAmountOrdered()
public
setBaseAmountOrdered(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseAmountPaid()
public
setBaseAmountPaid(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseAmountPaidOnline()
public
setBaseAmountPaidOnline(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseAmountRefunded()
public
setBaseAmountRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseAmountRefundedOnline()
public
setBaseAmountRefundedOnline(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingAmount()
public
setBaseShippingAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingCaptured()
public
setBaseShippingCaptured(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetBaseShippingRefunded()
public
setBaseShippingRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetCcApproval()
public
setCcApproval(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcAvsStatus()
public
setCcAvsStatus(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcCid()
public
setCcCid(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcCidStatus()
public
setCcCidStatus(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcDebugRequestBody()
public
setCcDebugRequestBody(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcDebugResponseBody()
public
setCcDebugResponseBody(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcDebugResponseSerialized()
public
setCcDebugResponseSerialized(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcExpMonth()
public
setCcExpMonth(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcExpYear()
public
setCcExpYear(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcLast4()
public
setCcLast4(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcNumber()
public
setCcNumber(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcNumberEnc()
public
setCcNumberEnc(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcOwner()
public
setCcOwner(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcSsIssue()
public
setCcSsIssue(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcSsStartMonth()
public
setCcSsStartMonth(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcSsStartYear()
public
setCcSsStartYear(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcStatus()
public
setCcStatus(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcStatusDescription()
public
setCcStatusDescription(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcTransId()
public
setCcTransId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCcType()
public
setCcType(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCreatedAt()
public
setCreatedAt(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetCreatedCreditmemo()
public
setCreatedCreditmemo(Mage_Sales_Model_Order_Creditmemo|null $value) : static
Parameters
- $value : Mage_Sales_Model_Order_Creditmemo|null
Return values
staticsetCreatedInvoice()
public
setCreatedInvoice(Mage_Sales_Model_Order_Invoice|null $value) : static
Parameters
- $value : Mage_Sales_Model_Order_Invoice|null
Return values
staticsetCreatedTransaction()
public
setCreatedTransaction(Mage_Sales_Model_Order_Payment_Transaction|null $value) : static
Parameters
- $value : Mage_Sales_Model_Order_Payment_Transaction|null
Return values
staticsetCreditmemo()
public
setCreditmemo(Mage_Sales_Model_Order_Creditmemo|null $value) : static
Parameters
- $value : Mage_Sales_Model_Order_Creditmemo|null
Return values
staticsetCustomerPaymentId()
public
setCustomerPaymentId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetCybersourceToken()
public
setCybersourceToken(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetData()
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
$thissetDataChanges()
Clears data changes status
public
setDataChanges(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetDataUsingMethod()
Set object data with calling setter method
public
setDataUsingMethod(string $key[, mixed $args = [] ]) : $this
Parameters
- $key : string
- $args : mixed = []
Return values
$thissetEcheckAccountName()
public
setEcheckAccountName(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetEcheckAccountType()
public
setEcheckAccountType(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetEcheckBankName()
public
setEcheckBankName(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetEcheckRoutingNumber()
public
setEcheckRoutingNumber(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetEcheckType()
public
setEcheckType(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetFlo2cashAccountId()
public
setFlo2cashAccountId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetId()
Declare model object identifier value
public
setId(mixed $id) : $this
Parameters
- $id : mixed
Attributes
- #[Override]
Return values
$thissetIdealIssuerId()
public
setIdealIssuerId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetIdealIssuerTitle()
public
setIdealIssuerTitle(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetIdealTransactionChecked()
public
setIdealTransactionChecked(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetIdFieldName()
set name of object id field
public
setIdFieldName(string $name) : $this
Parameters
- $name : string
Return values
$thissetInvoice()
public
setInvoice(Mage_Sales_Model_Order_Invoice|null $invoice) : self
Parameters
- $invoice : Mage_Sales_Model_Order_Invoice|null
Return values
selfsetIsFraudDetected()
public
setIsFraudDetected([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetLastTransId()
public
setLastTransId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetMessage()
public
setMessage(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetMethod()
public
setMethod(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetMethodInstance()
public
setMethodInstance(Mage_Payment_Model_Method_Abstract $value) : static
Parameters
- $value : Mage_Payment_Model_Method_Abstract
Return values
staticsetOrder()
Declare order model object
public
setOrder(Mage_Sales_Model_Order $order) : $this
Parameters
- $order : Mage_Sales_Model_Order
Return values
$thissetOrigData()
Initialize object original data
public
setOrigData([string $key = null ][, mixed $data = null ]) : $this
Parameters
- $key : string = null
- $data : mixed = null
Return values
$thissetParentId()
public
setParentId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetParentTransactionId()
public
setParentTransactionId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetPayboxQuestionNumber()
public
setPayboxQuestionNumber(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetPayboxRequestNumber()
public
setPayboxRequestNumber(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetPoNumber()
public
setPoNumber(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetProtectionEligibility()
public
setProtectionEligibility(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetQuotePaymentId()
public
setQuotePaymentId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetRefundTransactionId()
public
setRefundTransactionId(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetShippingAmount()
public
setShippingAmount(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingCaptured()
public
setShippingCaptured(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShippingRefunded()
public
setShippingRefunded(float|null $value) : static
Parameters
- $value : float|null
Return values
staticsetShouldCloseParentTransaction()
public
setShouldCloseParentTransaction([bool|null $value = true ]) : static
Parameters
- $value : bool|null = true
Return values
staticsetStoreId()
public
setStoreId(int|null $value) : static
Parameters
- $value : int|null
Return values
staticsetTransactionAdditionalInfo()
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
staticsetUpdatedAt()
public
setUpdatedAt(string|null $value) : static
Parameters
- $value : string|null
Return values
staticsetVoidTransactionId()
public
setVoidTransactionId(string|null $value) : static
Parameters
- $value : string|null
Return values
statictoArray()
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
stringtoString()
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
stringtoXml()
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
stringunsAdditionalInformation()
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
$thisunsetData()
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
$thisunsetOldData()
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
$thisunsTransactionId()
public
unsTransactionId() : $this
Return values
$thisvoid()
Void payment online
public
void(DataObject $document) : $this
Parameters
- $document : DataObject
Tags
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_appendTransactionToMessage()
Append transaction ID (if any) message to the specified message
protected
_appendTransactionToMessage(Mage_Sales_Model_Order_Payment_Transaction|string|null $transaction, string $message) : string
Parameters
- $transaction : Mage_Sales_Model_Order_Payment_Transaction|string|null
- $message : string
Return values
string_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_generateTransactionId()
Update transaction ids for further processing If no transactions were set before invoking, may generate an "offline" transaction id
protected
_generateTransactionId(string $type[, Mage_Sales_Model_Order_Payment_Transaction|false $transactionBasedOn = false ]) : mixed
Parameters
- $type : string
- $transactionBasedOn : Mage_Sales_Model_Order_Payment_Transaction|false = false
_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>_getInvoiceForTransactionId()
Return invoice model for transaction
protected
_getInvoiceForTransactionId(string $transactionId) : Mage_Sales_Model_Order_Invoice|false
Parameters
- $transactionId : string
Return values
Mage_Sales_Model_Order_Invoice|false_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.
_invoice()
Create new invoice with maximum qty for invoice for each item register this invoice and capture
protected
_invoice() : Mage_Sales_Model_Order_Invoice
Return values
Mage_Sales_Model_Order_Invoice_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_lookupTransaction()
Find one transaction by ID or type
protected
_lookupTransaction(string|false|null $txnId[, string|false $txnType = false ]) : Mage_Sales_Model_Order_Payment_Transaction|false
Parameters
- $txnId : string|false|null
- $txnType : string|false = false
Return values
Mage_Sales_Model_Order_Payment_Transaction|false_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
_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'