SPBAS v1.7 API Documentation


Billing\pay_gateways
admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 8

Class pay_gateways

pay_gateways

public class pay_gateways

SPBAS Pay Gateways

Author:
Andy Rockwell

Method Summary
integer|boolean

add_gateway(string name, string gateway, integer email_configuration_id)

Add a new pay gateway

boolean

add_gateway_jorder_form(integer pay_gateway_id, integer order_form_id)

Add a pay gateway to an order form

integer|boolean

add_payment(integer invoice_id, string description, string transaction_id, string subscription_id, decimal amount, integer created)

Add an invoice payment

boolean

assign_email_templates(integer gateway_id, array assignments)

Update product e-mail assignments

array

available_select()

Get a list of available pay gateways suitable for forms::select()

boolean

change_package_status(integer order_id, integer invoice_id, string package_status)

Change the package status and the status of all assets

integer|boolean

clickbank_item(integer gateway_id, integer sku_id)

Get clickbank item ID for a product sku

boolean

clickbank_sync(integer gateway_id, integer sku_id, integer clickbank_id)

Get clickbank item ID for a product sku

boolean

delete_log(integer id)

Remove a pay gateway log

array|boolean

get(integer id)

Get the pay gateway data

array

get_all_gateways_wa()

Get a list of all pay gateways with attributes.

array

get_all_gateways_wp(string sort, array link_extras)

Get a list of all pay gateways with paging.

array

get_all_invoices(integer order_id, boolean package_suspension_flag)

All invoices for an order

array

get_attributes(integer id)

Get the pay gateway specific attributes

array

get_log(integer id)

Get the pay gateway log data

array

get_logs_for_gateway_wp(integer pay_gateway_id, string sort, array link_extras)

Get a list of all pay gateway logs for a specific gateway with paging.

array

get_logs_wp(string sort, array link_extras)

Get a list of all pay gateway logs with paging.

array

get_pay_gateway_emails(integer gateway_id, integer full_set)

Get templates for a specific pay gateway

array

invoices_for_order(integer order_id, string status)

Get all invoices for an order ID

array

isset_gateway_jorder_form(integer pay_gateway_id, integer order_form_id)

Get all order forms for a gateway

boolean

log(string message, string data, integer order_form_id, integer pay_gateway_id, string pay_gateway_name, string session_id, integer order_id, integer customer_id, integer user_id)

Log payments

integer

make_default()

Get the default pay gateway id

array

make_select()

Make an array suitable for forms::select().

array

oldest_unpaid_invoice(integer order_id)

Get the oldest unpaid invoice for an order

boolean

payment_already_applied(string transaction_id)

Is this a duplicate transaction?

boolean

process_subscription_payment(string pay_gateway_name, integer order_id, string transaction_id, string subscription_id, decimal amount_paid)

Process an incoming subscription payment.

boolean

remove(integer id)

Remove a pay gateway

boolean

remove_gateway_jorder_form(integer pay_gateway_id, integer order_form_id)

Remove a pay gateway from an order form

boolean

save_attribute(integer pay_gateway_id, string key, mixed value)

Remove a pay gateway from an order form

array

search(string terms, string sort_by, string order)

Search pay gateways

boolean

session_payment(integer session_id, integer pay_gateway_id, string pay_gateway_name, string transaction_id, string subscription_id, decimal amount_paid)

Record the payment

boolean

session_payment_by_transaction_id(integer transaction_id, integer pay_gateway_id, string pay_gateway_name, string subscription_id, decimal amount_paid)

Record the payment using the transaction ID

boolean

update_gateway(integer id, string name, string gateway)

Update a pay gateway

boolean

update_invoice_package_status(integer id, string package_status)

Update the invoice package status column

boolean

update_status(integer id, string status, mixed paid_date)

Update the invoice status

Method Detail

admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 60

add_gateway

public integer|boolean add_gateway(string name, string gateway, integer email_configuration_id)

Add a new pay gateway

Returns:
insert ID integer on success; boolean false on failure

admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 376

add_gateway_jorder_form

public boolean add_gateway_jorder_form(integer pay_gateway_id, integer order_form_id)

Add a pay gateway to an order form


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 542

add_payment

public integer|boolean add_payment(integer invoice_id, string description, string transaction_id, string subscription_id, decimal amount, integer created)

Add an invoice payment

Returns:
insert ID integer on success; boolean false on failure

admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 474

assign_email_templates

public boolean assign_email_templates(integer gateway_id, array assignments)

Update product e-mail assignments


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 15

available_select

public array available_select()

Get a list of available pay gateways suitable for forms::select()


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 617

change_package_status

public boolean change_package_status(integer order_id, integer invoice_id, string package_status)

Change the package status and the status of all assets


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 423

clickbank_item

public integer|boolean clickbank_item(integer gateway_id, integer sku_id)

Get clickbank item ID for a product sku

Returns:
integer clickbank item ID; boolean false on failure

admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 438

clickbank_sync

public boolean clickbank_sync(integer gateway_id, integer sku_id, integer clickbank_id)

Get clickbank item ID for a product sku


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 260

delete_log

public boolean delete_log(integer id)

Remove a pay gateway log


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 327

get

public array|boolean get(integer id)

Get the pay gateway data

Returns:
array on success; boolean on failure

admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 291

get_all_gateways_wa

public array get_all_gateways_wa()

Get a list of all pay gateways with attributes.


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 272

get_all_gateways_wp

public array get_all_gateways_wp(string sort, array link_extras)

Get a list of all pay gateways with paging.


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 587

get_all_invoices

public array get_all_invoices(integer order_id, boolean package_suspension_flag)

All invoices for an order


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 338

get_attributes

public array get_attributes(integer id)

Get the pay gateway specific attributes


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 174

get_log

public array get_log(integer id)

Get the pay gateway log data


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 128

get_logs_for_gateway_wp

public array get_logs_for_gateway_wp(integer pay_gateway_id, string sort, array link_extras)

Get a list of all pay gateway logs for a specific gateway with paging.


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 152

get_logs_wp

public array get_logs_wp(string sort, array link_extras)

Get a list of all pay gateway logs with paging.


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 454

get_pay_gateway_emails

public array get_pay_gateway_emails(integer gateway_id, integer full_set)

Get templates for a specific pay gateway


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 492

invoices_for_order

public array invoices_for_order(integer order_id, string status)

Get all invoices for an order ID


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 357

isset_gateway_jorder_form

public array isset_gateway_jorder_form(integer pay_gateway_id, integer order_form_id)

Get all order forms for a gateway


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 84

log

public boolean log(string message, string data, integer order_form_id, integer pay_gateway_id, string pay_gateway_name, string session_id, integer order_id, integer customer_id, integer user_id)

Log payments


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 45

make_default

public integer make_default()

Get the default pay gateway id

Returns:
pay gateway ID

admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 309

make_select

public array make_select()

Make an array suitable for forms::select().


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 513

oldest_unpaid_invoice

public array oldest_unpaid_invoice(integer order_id)

Get the oldest unpaid invoice for an order


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 524

payment_already_applied

public boolean payment_already_applied(string transaction_id)

Is this a duplicate transaction?


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 643

process_subscription_payment

public boolean process_subscription_payment(string pay_gateway_name, integer order_id, string transaction_id, string subscription_id, decimal amount_paid)

Process an incoming subscription payment.


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 249

remove

public boolean remove(integer id)

Remove a pay gateway


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 393

remove_gateway_jorder_form

public boolean remove_gateway_jorder_form(integer pay_gateway_id, integer order_form_id)

Remove a pay gateway from an order form


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 406

save_attribute

public boolean save_attribute(integer pay_gateway_id, string key, mixed value)

Remove a pay gateway from an order form


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 204

search

public array search(string terms, string sort_by, string order)

Search pay gateways


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 100

session_payment

public boolean session_payment(integer session_id, integer pay_gateway_id, string pay_gateway_name, string transaction_id, string subscription_id, decimal amount_paid)

Record the payment


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 115

session_payment_by_transaction_id

public boolean session_payment_by_transaction_id(integer transaction_id, integer pay_gateway_id, string pay_gateway_name, string subscription_id, decimal amount_paid)

Record the payment using the transaction ID


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 191

update_gateway

public boolean update_gateway(integer id, string name, string gateway)

Update a pay gateway


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 575

update_invoice_package_status

public boolean update_invoice_package_status(integer id, string package_status)

Update the invoice package status column


admin/modules/pay_gateways/lib/classes/pay_gateways.php at line 561

update_status

public boolean update_status(integer id, string status, mixed paid_date)

Update the invoice status


SPBAS v1.7 API Documentation