Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail

Package s2Member\ccBill

pro\s2member-pro\includes\classes\gateways\ccbill\ccbill-utilities.inc.php at line #44

Class c_ws_plugin__s2member_pro_ccbill_utilities

c_ws_plugin__s2member_pro_ccbill_utilities

public class c_ws_plugin__s2member_pro_ccbill_utilities

ccBill® utilities.

Since:

1.5


( 5 Methods )
Method Summary
public static str

ccbill_currency_code(int|str $currency_numr)

Converts Currency Number for ccBill® forms into a valid Currency Code.

public static int|str

ccbill_currency_numr(str $currency_code)

Converts currency code to a numeric code for ccBill®.

public static str

ccbill_link_gen(array $vars)

Generates a ccBill® link.

public static int

ccbill_per_term_2_days(int|str $period, str $term)

Calculates period in days for ccBill® forms.

public static array|bool

ccbill_postvars()

Get $_POST or $_REQUEST vars from ccBill®.

( 5 Methods )
Method Detail

pro\s2member-pro\includes\classes\gateways\ccbill\ccbill-utilities.inc.php at line #96

ccbill_currency_code()

public static str ccbill_currency_code(int|str $currency_numr)

Converts Currency Number for ccBill® forms into a valid Currency Code.

Since:

1.5

Parameters:

int|str $currency_numr - Expects a valid ccBill® Currency Number, numeric.

Returns:

str - A 3 character Currency Code, for use with s2Member. Defaults to USD ( i.e. 840 ).

[ back to top ]

pro\s2member-pro\includes\classes\gateways\ccbill\ccbill-utilities.inc.php at line #79

ccbill_currency_numr()

public static int|str ccbill_currency_numr(str $currency_code)

Converts currency code to a numeric code for ccBill®.

Since:

1.5

Parameters:

str $currency_code - Expects a 3 character Currency Code.

Returns:

int|str - A numeric string with a ccBill® Currency Number. Defaults to 840 ( i.e. USD ).

[ back to top ]

pro\s2member-pro\includes\classes\gateways\ccbill\ccbill-utilities.inc.php at line #58 public static str ccbill_link_gen(array $vars)

Generates a ccBill® link.

Since:

1.5

Parameters:

array $vars - An array of variables to include in the ccBill® link.

Returns:

str - A full URL to the ccBill® Payment Gateway.

Todo:

Optimize this routine with empty() and isset().

Candidate for the use of ifsetor()?

[ back to top ]

pro\s2member-pro\includes\classes\gateways\ccbill\ccbill-utilities.inc.php at line #112

ccbill_per_term_2_days()

public static int ccbill_per_term_2_days(int|str $period, str $term)

Calculates period in days for ccBill® forms.

Since:

1.5

Parameters:

int|str $period - Optional. A numeric Period that coincides with $term.

str $term - Optional. A Term that coincides with $period.

Returns:

int - A "Period Term", in days. Defaults to 0.

[ back to top ]

pro\s2member-pro\includes\classes\gateways\ccbill\ccbill-utilities.inc.php at line #139

ccbill_postvars()

public static array|bool ccbill_postvars()

Get $_POST or $_REQUEST vars from ccBill®.

Since:

1.5

Returns:

array|bool - An array of verified $_POST or $_REQUEST variables, else false.

Todo:

Continue optimizing this routine with empty() and isset().

Candidate for the use of ifsetor()?

Update to use strcasecmp().

[ back to top ]

Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail