Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail

Package s2Member\Google

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

Class c_ws_plugin__s2member_pro_google_utilities

c_ws_plugin__s2member_pro_google_utilities

public class c_ws_plugin__s2member_pro_google_utilities

Google® utilities.

Since:

1.5


( 6 Methods )
Method Summary
public static array

google_api_headers()

Formulates request Authorization headers.

public static array|bool

google_parse_s2vars(str $xml)

Parses s2Vars from Google® IPN Notifications.

public static str

google_periodicity(str $period_term)

Converts a "Period Term" into a Google® periodicity for XML subscription attribute.

public static array|bool

google_postvars()

Get $_POST or $_REQUEST vars from Google®.

public static str

google_sign(str $xml)

Builds an HMAC-SHA1 signature for XML data transfer verification.

public static int

google_start_time(str $period1, str $period3)

Calculates start date for a Recurring Payment Profile.

( 6 Methods )
Method Detail

pro\s2member-pro\includes\classes\gateways\google\google-utilities.inc.php at line #69

google_api_headers()

public static array google_api_headers()

Formulates request Authorization headers.

Since:

1.5

Returns:

array - Request Authorization headers for Google® API communication.

[ back to top ]

pro\s2member-pro\includes\classes\gateways\google\google-utilities.inc.php at line #125

google_parse_s2vars()

public static array|bool google_parse_s2vars(str $xml)

Parses s2Vars from Google® IPN Notifications.

Since:

1.5

Parameters:

str $xml - XML data section returned by Google® for s2Vars.

Returns:

array|bool - An array of s2Vars, else false on failure.

[ back to top ]

pro\s2member-pro\includes\classes\gateways\google\google-utilities.inc.php at line #88

google_periodicity()

public static str google_periodicity(str $period_term)

Converts a "Period Term" into a Google® periodicity for XML subscription attribute.

Since:

1.5

Parameters:

str $period_term - A "Period Term" combination.

Returns:

str - The Google® Checkout equivalent for $period_term. One of DAILY, WEEKLY, SEMI_MONTHLY, MONTHLY, EVERY_TWO_MONTHS, QUARTERLY, or YEARLY. Defaults to MONTHLY if $period_term is not configured properly.

[ back to top ]

pro\s2member-pro\includes\classes\gateways\google\google-utilities.inc.php at line #148

google_postvars()

public static array|bool google_postvars()

Get $_POST or $_REQUEST vars from Google®.

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()?

[ back to top ]

pro\s2member-pro\includes\classes\gateways\google\google-utilities.inc.php at line #55

google_sign()

public static str google_sign(str $xml)

Builds an HMAC-SHA1 signature for XML data transfer verification.

Since:

1.5

Parameters:

str $xml - An XML data string to sign.

Returns:

str - An HMAC-SHA1 signature string.

[ back to top ]

pro\s2member-pro\includes\classes\gateways\google\google-utilities.inc.php at line #175

google_start_time()

public static int google_start_time(str $period1, str $period3)

Calculates start date for a Recurring Payment Profile.

Since:

1.5

Parameters:

str $period1 - Optional. A "Period Term" combination. Defaults to 0 D.

str $period3 - Optional. A "Period Term" combination. Defaults to 0 D.

Returns:

int - The start time, a Unix timestamp.

[ back to top ]

Source Code Documentation


Field Summary | Method Summary | Field Detail | Method Detail