SLP® phpDocs

MySLP_Payment_Processor_Interface

Interface MySLP_Payment_Processor_Interface

Table of Contents

Methods

cancel_subscription()  : mixed
Cancel an existing subscription.
change_subscription()  : mixed
Change an existing subscription.
create_subscription()  : mixed
Create a subscription for a user.
get_api_version()  : mixed
Get the API Version
get_customer_details()  : WP_Error|Customer
Get the customer ID.
get_subscription_details()  : mixed
Get the subscription details from the payment processor.
is_ready()  : bool
Is this processor ready? Check base settings and return true if it is ready to go.

Methods

cancel_subscription()

Cancel an existing subscription.

public cancel_subscription() : mixed

It should return a WP_Error if there are any problems.

change_subscription()

Change an existing subscription.

public change_subscription(string $new_plan) : mixed

It should return a WP_Error if there are any problems.

Parameters
$new_plan : string

create_subscription()

Create a subscription for a user.

public create_subscription(WP_REST_Request $request) : mixed

This method should talk to the payment processor to set up a recurring billing agreement.

It should return an array with the details of the billing agreement that came back from the processor.

It should return a WP_Error if there are any problems.

Parameters
$request : WP_REST_Request

get_api_version()

Get the API Version

public get_api_version() : mixed

This method should use the payment processor API library and read the version.

It should return a string with the API version.

It should return a WP_Error if there are any problems.

get_customer_details()

Get the customer ID.

public get_customer_details(string $customer_id) : WP_Error|Customer
Parameters
$customer_id : string
Return values
WP_Error|Customer

get_subscription_details()

Get the subscription details from the payment processor.

public get_subscription_details(string $subscription_id) : mixed
Parameters
$subscription_id : string

        
On this page

Search results