s2Member v110815
Package Class: s2Member\PayPal\c_ws_plugin__s2member_paypal_utilities
Docs updated: August 15, 2011, 2:33 pm
Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Class Summary Classes Hooks/Filters Field Summary | Method Summary | Field Detail | Method Detail Package s2Member\PayPal s2member\includes\classes\paypal-utilities.inc.php at line #28 Class c_ws_plugin__s2member_paypal_utilities c_ws_plugin__s2member_paypal_utilities public class c_ws_plugin__s2member_paypal_utilities PayPal® utilities. Since: 3.5 ( 11 Methods )Method Summary public static array _paypal_api_response_filters(array $response) A sort of callback function that Filters PayPal® responses. public static array paypal_api_response(array $post_vars) Calls upon the PayPal® API, and returns the response. public static array|bool paypal_postvars() Get $_POST or $_REQUEST vars from PayPal®. public static str|bool paypal_pro_item_name(str|array $array_or_string) Get item_name from either an array with product_name|item_name1|item_name, or use an existing string. public static str|bool paypal_pro_item_number(str|array $array_or_string) Get item_number from either an array with PROFILEREFERENCE|rp_invoice_id|item_number1|item_number, or use an existing string. public static str paypal_pro_period1(str|array $array_or_string) Get period1 from either an array with PROFILEREFERENCE|rp_invoice_id|period1, or use an existing string. public static str paypal_pro_period3(str|array $array_or_string) Get period3 from either an array with PROFILEREFERENCE|rp_invoice_id|period3, or use an existing string. public static str|bool paypal_pro_subscr_id(str|array $array_or_string) Get subscr_id from either an array with recurring_payment_id|subscr_id, or use an existing string. public static bool|str paypal_pro_term(str $term) Converts a term D|W|M|Y into PayPal® Pro format. public static str paypal_proxy_key_gen() Generates a PayPal® Proxy Key, for simulated IPN responses. public static bool|str paypal_std_term(str $term) Converts a term Day|Week|Month|Year into PayPal® Standard format. ( 11 Methods )Method Detail s2member\includes\classes\paypal-utilities.inc.php at line #208 _paypal_api_response_filters() public static array _paypal_api_response_filters(array $response) A sort of callback function that Filters PayPal® responses. Provides alternative explanations in some cases that require special attention. Since: 3.5 Parameters: array $response - Expects an array of response variables returned by the PayPal® API. Returns: array - An array of variables returned by the PayPal® API, after $response [ "__error" ] is Filtered. [ back to top ] s2member\includes\classes\paypal-utilities.inc.php at line #140 paypal_api_response() public static array paypal_api_response(array $post_vars) Calls upon the PayPal® API, and returns the response. Since: 3.5 Parameters: array $post_vars - An array of variables to send through the PayPal® API call. Returns: array - An array of variables returned by the PayPal® API. Todo: Optimize this routine with empty ( ) and isset ( ) . [ back to top ] s2member\includes\classes\paypal-utilities.inc.php at line #38 paypal_postvars() public static array|bool paypal_postvars() Get $_POST or $_REQUEST vars from PayPal®. Since: 3.5 Returns: array|bool - An array of verified $_POST or $_REQUEST variables, else false. [ back to top ] s2member\includes\classes\paypal-utilities.inc.php at line #341 paypal_pro_item_name() public static str|bool paypal_pro_item_name(str|array $array_or_string) Get item_name from either an array with product_name|item_name1|item_name, or use an existing string. Since: 3.5 Parameters: str|array $array_or_string - Either an array of PayPal® post vars, or a string. Returns: str|bool - An item_name string if non-empty, else false. [ back to top ] s2member\includes\classes\paypal-utilities.inc.php at line #306 paypal_pro_item_number() public static str|bool paypal_pro_item_number(str|array $array_or_string) Get item_number from either an array with PROFILEREFERENCE|rp_invoice_id|item_number1|item_number, or use an existing string. Since: 3.5 Parameters: str|array $array_or_string - Either an array of PayPal® post vars, or a string. If it's a string, we make sure it is a valid level:ccaps:eotper or sp:ids:expiration combination. Returns: str|bool - An item_number string if non-empty, else false. [ back to top ] s2member\includes\classes\paypal-utilities.inc.php at line #374 paypal_pro_period1() public static str paypal_pro_period1(str|array $array_or_string) Get period1 from either an array with PROFILEREFERENCE|rp_invoice_id|period1, or use an existing string. This will also convert 1 Day, into 1 D, and so on. This will also convert 1 SemiMonth, into 2 W, and so on. Since: 3.5 Parameters: str|array $array_or_string - Either an array of PayPal® post vars, or a string. If it's a string, we make sure it is a valid period term combination. Returns: str - A period1 string if possible, or defaults to 0 D. [ back to top ] s2member\includes\classes\paypal-utilities.inc.php at line #426 paypal_pro_period3() public static str paypal_pro_period3(str|array $array_or_string) Get period3 from either an array with PROFILEREFERENCE|rp_invoice_id|period3, or use an existing string. This will also convert 1 Day, into 1 D, and so on. This will also convert 1 SemiMonth, into 2 W, and so on. The Regular Period can never be less than 1 day ( 1 D ). Since: 3.5 Parameters: str|array $array_or_string - Either an array of PayPal® post vars, or a string. If it's a string, we make sure it is a valid period term combination. Returns: str - A period3 string if possible, or defaults to 1 D. [ back to top ] s2member\includes\classes\paypal-utilities.inc.php at line #279 paypal_pro_subscr_id() public static str|bool paypal_pro_subscr_id(str|array $array_or_string) Get subscr_id from either an array with recurring_payment_id|subscr_id, or use an existing string. Since: 3.5 Parameters: str|array $array_or_string - Either an array of PayPal® post vars, or a string. Returns: str|bool - A subscr_id string if non-empty, else false. [ back to top ] s2member\includes\classes\paypal-utilities.inc.php at line #237 paypal_pro_term() public static bool|str paypal_pro_term(str $term) Converts a term D|W|M|Y into PayPal® Pro format. Since: 3.5 Parameters: str $term - Expects one of D|W|M|Y. Returns: bool|str - A full singular description of the term ( i.e. Day|Week|Month|Year ), else false. [ back to top ] s2member\includes\classes\paypal-utilities.inc.php at line #113 paypal_proxy_key_gen() public static str paypal_proxy_key_gen() Generates a PayPal® Proxy Key, for simulated IPN responses. Since: 3.5 Returns: str - A Proxy Key. It's an MD5 Hash, 32 chars, URL-safe. [ back to top ] s2member\includes\classes\paypal-utilities.inc.php at line #258 paypal_std_term() public static bool|str paypal_std_term(str $term) Converts a term Day|Week|Month|Year into PayPal® Standard format. Since: 3.5 Parameters: str $term - Expects one of Day|Week|Month|Year. Returns: bool|str - A term code ( i.e. D|W|M|Y ), else false. [ back to top ] Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Class Summary Classes Hooks/Filters Field Summary | Method Summary | Field Detail | Method Detail(!-- :: s-words --)Statistics: Posted by System Robot — August 15th, 2011, 1:33 pm
]]>