SLP® phpDocs

MySLP_Recurring_Payments extends MySLP_Base
in package

Class MySLP_Recurring_Payments

Table of Contents

Properties

$failed_response  : array<string|int, mixed>
$paypal_processor  : mixed
$subscription_details_cache_key  : mixed

Methods

__construct()  : mixed
Geo_Base constructor.
add_payment_data()  : void
Add new data to 'recurring_payments' and store in meta.
clear_subscription_details_cache()  : void
Clear the subscription details cache.
create_recurring_payments_profile()  : array<string|int, mixed>
PAYPAL: Create the Recurring Payments Profile at PayPal.
get_customer_card_details()  : WP_Error|array<string|int, mixed>
STRIPE: Get payment info for the logged-in user's subscription.
get_instance()  : mixed
Return an instance of the object.
get_recurring_payment_details()  : WP_Error|array<string|int, mixed>
PAYPAL Get the recurring payment details from PayPal.
get_subscription_details()  : WP_Error|array<string|int, mixed>
Get the subscription details (possibly cached).
initialize()  : void
On init action
subscription_not_cancelled_notice()  : void
PAYPAL: Notice when we have an issue cancelling a pre-existing subscription during upgrade/downgrade.
subscription_resubscribe_notice()  : void
PAYPAL: The user re-activated their subscription.
get_paypal_checkout_details()  : void
PAYPAL On PayPal return from the Express checkout
get_plan_level()  : array<string|int, mixed>|bool
TODO: see MySLP_Service_Levels class. Map to that.
get_plan_worth()  : bool
get_subscription_details_cache_key()  : void
Get the key for the subscription details transient (cache).
load_paypal_processor()  : void
PAYPAL Load PayPal Processor
paypal_resubscribe_recurring_payment()  : void
PAYPAL Process the recurring payment re-subscription runs only if the current user already subscribed but cancel his status
run_paypal_command()  : array<string|int, mixed>
PAYPAL: Run a PayPal Command

Properties

$failed_response

private array<string|int, mixed> $failed_response = array('IS_GOOD' => \false, 'ACK' => '')

Methods

__construct()

Geo_Base constructor.

public __construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
$options : array<string|int, mixed> = array()

add_payment_data()

Add new data to 'recurring_payments' and store in meta.

public add_payment_data(int $user_id, array<string|int, mixed> $new_data[, bool $clear_errors = false ]) : void

This stores the payment PROFILE data from the CreateRecurringPaymentsProfile call.

Parameters
$user_id : int
$new_data : array<string|int, mixed>
$clear_errors : bool = false
Tags
used-by

MySLP_DSRA::add_account()

clear_subscription_details_cache()

Clear the subscription details cache.

public clear_subscription_details_cache() : void

create_recurring_payments_profile()

PAYPAL: Create the Recurring Payments Profile at PayPal.

public create_recurring_payments_profile(mixed $user_id, mixed $token, mixed $payer_id[, string|null $plan = null ][, string|null $amt = null ]) : array<string|int, mixed>
Parameters
$user_id : mixed
$token : mixed
$payer_id : mixed
$plan : string|null = null

which plan the user purchased (text: advanced, etc.)

$amt : string|null = null

how much that plan is at the time this subscription is run

Return values
array<string|int, mixed>

get_customer_card_details()

STRIPE: Get payment info for the logged-in user's subscription.

public get_customer_card_details() : WP_Error|array<string|int, mixed>
Tags
throws
ApiErrorException
uses
MySLP_Payments::load_processor
Return values
WP_Error|array<string|int, mixed>

get_instance()

Return an instance of the object.

public static get_instance([array<string|int, mixed> $options = array() ]) : mixed
Parameters
$options : array<string|int, mixed> = array()

get_recurring_payment_details()

PAYPAL Get the recurring payment details from PayPal.

public get_recurring_payment_details(string $token[, bool $force = false ]) : WP_Error|array<string|int, mixed>
Parameters
$token : string
$force : bool = false
Return values
WP_Error|array<string|int, mixed>

get_subscription_details()

Get the subscription details (possibly cached).

public get_subscription_details([int|null $user_id = null ][, bool $force = false ]) : WP_Error|array<string|int, mixed>
Parameters
$user_id : int|null = null

The User ID to process, default current blog user.

$force : bool = false

Force transient to expire.

Return values
WP_Error|array<string|int, mixed>

subscription_not_cancelled_notice()

PAYPAL: Notice when we have an issue cancelling a pre-existing subscription during upgrade/downgrade.

public subscription_not_cancelled_notice() : void

subscription_resubscribe_notice()

PAYPAL: The user re-activated their subscription.

public subscription_resubscribe_notice() : void

get_paypal_checkout_details()

PAYPAL On PayPal return from the Express checkout

private get_paypal_checkout_details() : void

get_plan_level()

TODO: see MySLP_Service_Levels class. Map to that.

private get_plan_level(mixed $plan, mixed $user_id) : array<string|int, mixed>|bool
Parameters
$plan : mixed
$user_id : mixed
Return values
array<string|int, mixed>|bool

get_plan_worth()

private get_plan_worth(mixed $user_id[, string $plan = '' ]) : bool
Parameters
$user_id : mixed
$plan : string = ''
Return values
bool

get_subscription_details_cache_key()

Get the key for the subscription details transient (cache).

private get_subscription_details_cache_key() : void

paypal_resubscribe_recurring_payment()

PAYPAL Process the recurring payment re-subscription runs only if the current user already subscribed but cancel his status

private paypal_resubscribe_recurring_payment() : void

run_paypal_command()

PAYPAL: Run a PayPal Command

private run_paypal_command(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

mixed

Return values
array<string|int, mixed>

        
On this page

Search results