AlexT\BTPayment\BraintreeExtension
Class BraintreeExtension An extension of site configuration which adds Braintree Payment Settings in the admin page.
This class also provides some interface to get gateway, client id or create a customer in the vault if not exists
Synopsis
class BraintreeExtension
extends DataExtension
{
- // methods
- public void updateCMSFields()
- public static Gateway|null BTGateway()
- public static client BTClientToken()
- public static A BTClientId()
- public static new BTCreateClient()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Members
private
-
$db
{@inheritdoc} - $gateway
Methods
public
- BTClientId() — Get customer(client) id
- BTClientToken() — Generate client token based on customer id in the vault (should it exists)
- BTCreateClient() — Create a new customer in the vault
- BTGateway() — Get a Braintree Gateway object based on the Braintree credentials in the setting
- updateCMSFields() — Update site configuration with 'Brain Tree Payment' tab which includes 4 setting fields for payment credentials