ilateral\SilverStripe\StripeForms\Control\StripeWebhookController
Controller to specifically handle stripe webhooks (currently only related to subscriptions).
Synopsis
class StripeWebhookController
extends Controller
{
- // members
- private static String $url_segment = "stripeforms/webhooks";
- private static array $allowed_actions = ;
- protected Object $event_json;
- protected Event $event;
- // methods
- public void Link()
- public void AbsoluteLink()
- protected Object get_json_data()
- protected Boolean should_proceed()
- protected Member get_member()
- public void init()
- public void success()
- public void failed()
Hierarchy
Extends
- SilverStripe\Control\Controller
Members
private
- $allowed_actions
—
array
Actions (methods that handle URLs) that can be called on this controller - $url_segment
—
ilateral\SilverStripe\StripeForms\Control\String
The URL this controller is available via
protected
- $event
—
\Stripe\Event
The stripe event object - $event_json
—
ilateral\SilverStripe\StripeForms\Control\Object
The json object from the current event
Methods
protected
- get_json_data() — Get the json data from the current post and convert to an object
- get_member() — Get the member associated with the callback, or null.
- should_proceed() — Determine (based on the passed event type) if we want to proceed with the callback
public
- AbsoluteLink()
- Link()
- failed() — Action to handle failed payment callbacks. This action logs the number of failed payments and downgrades the user's account after 3.
- init()
- success() — use this action to generate an invoice on a successfull payment