ilateral\SilverStripe\StripeForms\Forms\StripePaymentDetailsForm
A form that allows the user to enter their card details and save them "into" stripe.
The end user enters their credit card details and when the
form is submitted, they are pushed to Stripe via the API.
The form is then pre-populated with summary details of the
saved payment details.
By default this form uses the default Stripe JS, if you wish
to overwrite this functionality (to perform custom operations)
then make sure you disable the use_custom_js config variable.
- Author: Mo <morven@ilateral.co.uk>
Synopsis
class StripePaymentDetailsForm
extends Form
{
- // members
- private static Boolean $use_custom_js = false;
- // methods
- public void __construct()
- protected ArrayData get_card_details()
- public SS_HTTPResponse doSavePaymentDetails()
Hierarchy
Extends
- SilverStripe\Forms\Form
Members
private
- $use_custom_js
—
ilateral\SilverStripe\StripeForms\Forms\Boolean
Config variable to specify if we want to use custom JS.
Methods
protected
- get_card_details() — Get the card details from stripe for the current user
public
- __construct()
- doSavePaymentDetails() — Save stripe payment details against a customer