\apex\transactionpayment

Handles all functionality regarding user's payment methods, including adding new payments methods, determining the payment method submitted from a form, obtaining payment method info from the database, and more.

Summary

Methods
Properties
Constants
__construct()
get_id()
add()
get_method_from_form()
create_user_options()
create_method_options()
load()
get_is_active()
get_is_default()
get_userid()
get_method()
get_method_id()
get_total_tx()
get_total_amount()
get_date_created()
get_label()
get_method_obj()
get_processor()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$payment_id
$is_active
$is_default
$method
$userid
$method_d
$total_tx
$total_amount
$date_created
$label
$account_data_id
$account
$method_obj
$processor
N/A

Properties

$payment_id

$payment_id :

Type

$is_active

$is_active :

Type

$is_default

$is_default :

Type

$method

$method :

Type

$userid

$userid :

Type

$method_d

$method_d :

Type

$total_tx

$total_tx :

Type

$total_amount

$total_amount :

Type

$date_created

$date_created :

Type

$label

$label :

Type

$account_data_id

$account_data_id :

Type

$account

$account :

Type

$method_obj

$method_obj :

Type

$processor

$processor :

Type

Methods

__construct()

__construct(\apex\transaction\int  $id)

Constructor

Parameters

\apex\transaction\int $id

get_id()

get_id(): integer

Get id# of the payment method.

Returns

integer —

The iD# of the payment method.

add()

add(): integer

Adds a new payment method from the POSTed database into the 'users_payment' table.

Returns

integer —

The I# of the new payment method

get_method_from_form()

get_method_from_form(): integer

Get payment ID from form.

Goes through the HTML form fields, and returns the ID# of the payment method being used, and creates a new payment method if necessary.

Returns

integer —

The ID# of the user's payment method to use.

create_user_options()

create_user_options(integer  $userid,string  $method)

Create user payment options

Parameters

integer $userid

The ID# of the user to create payment options for.

string $method

The method (deposit or withdraw) to create payment options for

create_method_options()

create_method_options(string  $method): string

Get method options

Parameters

string $method

The method (deposit / withdraw) to generate options for

Returns

string —

The resulting HTML options

load()

load(): array

Load a payment method

Returns

array —

Details of the payment method.

get_is_active()

get_is_active(): boolean

Get is_active

Returns

boolean —

Whether or not the payment method is active.

get_is_default()

get_is_default(): integer

Get is_default

Returns

integer —

Whether or not this is the default payment method on the user's account.

get_userid()

get_userid(): integer

Get userid

Returns

integer —

The id# of the user who owns the payment method.

get_method()

get_method(): string

Get method

Returns

string —

The method of the payment method, will be either 'deposit' or 'withdraw'.

get_method_id()

get_method_id(): integer

Get method_id

Returns

integer —

The Id# of the payment method as created by the administrator.

get_total_tx()

get_total_tx(): integer

Get total txs

Returns

integer —

The total number of transactions processed against this payment method.

get_total_amount()

get_total_amount(): float

Get total_amount

Returns

float —

The total amount processed against this payment method in base currency.

get_date_created()

get_date_created(): string

Get the date_created

Returns

string —

The timestamp the payment method was created.

get_label()

get_label(): string

Get label

Returns

string —

The label of the payment method.

get_method_obj()

get_method_obj(): object

Get method object

Returns

object —

The payment method, apex\transaction\payment_method class.

get_processor()

get_processor(): object

Get processor

Returns

object —

The payment processor controller object.