\apex\transactionTransaction

Handles all functionality on inidivudal transactions and payments, such as adding a new transaction to the database, updating the status of a transaction, retrieving a single transaction details, and more.

Summary

Methods
Properties
Constants
__construct()
get_account()
create_account()
create()
load()
add_note()
create_options()
$userid
$account_id
$status
$controller
$index_id
$reference_id
$amount
$fee
$fee_percent
$currency
$payment_id
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$format
$payment_methods
N/A

Properties

$userid

$userid :

Type

$account_id

$account_id :

Type

$status

$status :

Type

$controller

$controller :

Type

$index_id

$index_id :

Type

$reference_id

$reference_id :

Type

$amount

$amount :

Type

$fee

$fee :

Type

$fee_percent

$fee_percent :

Type

$currency

$currency :

Type

$payment_id

$payment_id :

Type

$payment_methods

$payment_methods :\apex\transaction\payment_methods

Type

\apex\transaction\payment_methods

Methods

__construct()

__construct(mixed  $trans_id)

Construct

Parameters

mixed $trans_id

Optional ID# of the transaction we're managing.

get_account()

get_account(integer  $userid,string  $currency,boolean  $auto_create = true)

Get user account

Parameters

integer $userid

The ID# of the user to retrieve an account for

string $currency

The currency of the account to retrieve

boolean $auto_create

If true and no account exists with the userid and currency, once will be automatically opened.

create_account()

create_account(integer  $userid,string  $currency,string  $label = '',integer  $delayed_sends,integer  $reqsigs): integer

Create a new transaction account

Parameters

integer $userid

The ID# of the user to create an account for

string $currency

The currency of the account to create

string $label

Optional label to easily dicern the account

integer $delayed_sends

Only for crypto accounts, and number of minutes to delay sends.

integer $reqsigs

Only for crypto accounts, and number of signatures to require to conduct sends.

Returns

integer —

The ID# of the newly created transaction account.

create()

create()

Create a new transaction using the values of the public properties within this class.

load()

load(boolean  $for_display = false)

Load a transaction

Parameters

boolean $for_display

Whether or not to format transaction to be displayed within the web browser.

add_note()

add_note(string  $note)

Add a note to a transaction

Parameters

string $note

The note to add to the transaction

create_options()

create_options(string  $selected = ''): string

Create select options of all transactions available.

Parameters

string $selected

Optional. The selected option.

Returns

string —

The HTML code of select options of all transactions