BraintreePluginOptions
Options for the Braintree plugin.
environment
EnvironmentEnvironment.SandboxThe Braintree environment being targeted, e.g. sandbox or production.
storeCustomersInBraintree
booleanfalseIf set to true, a Customer object
will be created in Braintree, which allows the secure storage ("vaulting") of previously-used payment methods.
This is done by adding a custom field to the Customer entity to store the Braintree customer ID,
so switching this on will require a database migration / synchronization.
Since v1.8, it is possible to override vaulting on a per-payment basis by passing includeCustomerId: false to the
generateBraintreeClientToken mutation.
extractMetadata
(transaction: Transaction) => PaymentMetadatav1.7.0Allows you to configure exactly what information from the Braintree
Transaction object (which is returned by the
transaction.sale() method of the SDK) should be persisted to the resulting Payment entity metadata.
By default, the built-in extraction function will return a metadata object that looks like this:
Example
merchantAccountIds
BraintreeMerchantAccountIdsAn optional mapping of currency codes to Braintree Merchant Account IDs. When set, the corresponding Merchant Account ID will be used for transactions in the given currency.