c_ws_plugin__s2member_pro_ccbill_utilities
public class c_ws_plugin__s2member_pro_ccbill_utilities
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 | Get |
public static str ccbill_currency_code(int|str $currency_numr)
Converts Currency Number for ccBill® forms into a valid Currency Code.
1.5
int|str $currency_numr - Expects a valid ccBill® Currency Number, numeric.
str - A 3 character Currency Code, for use with s2Member. Defaults to USD
( i.e. 840
).
public static int|str ccbill_currency_numr(str $currency_code)
Converts currency code to a numeric code for ccBill®.
1.5
str $currency_code - Expects a 3 character Currency Code.
int|str - A numeric string with a ccBill® Currency Number. Defaults to 840
( i.e. USD
).
public static str ccbill_link_gen(array $vars)
Generates a ccBill® link.
1.5
array $vars - An array of variables to include in the ccBill® link.
str - A full URL to the ccBill® Payment Gateway.
Optimize this routine with empty()
and isset()
.
Candidate for the use of ifsetor()
?
public static int ccbill_per_term_2_days(int|str $period, str $term)
Calculates period in days for ccBill® forms.
1.5
int|str $period - Optional. A numeric Period that coincides with $term
.
str $term - Optional. A Term that coincides with $period
.
int - A "Period Term", in days. Defaults to 0
.
public static array|bool ccbill_postvars()
Get $_POST
or $_REQUEST
vars from ccBill®.
1.5
array|bool - An array of verified $_POST
or $_REQUEST
variables, else false.
Continue optimizing this routine with empty()
and isset()
.
Candidate for the use of ifsetor()
?
Update to use strcasecmp()
.
ccBill® utilities.