Home

Awesome

Braintree Custom Fields Example for Magento 2

This is an example module demonstrating how to add a custom field to the Braintree transaction request within Magento 2.

Custom fields provide an easy way to collect additional information about your customers or their purchase, like the name of the product they purchased. They can be included when creating a transaction or adding a customer to the Vault, and can be stored in the Braintree gateway for reporting purposes.

Useful Links

Instructions

  1. Define a class that implements Magento\Braintree\Model\CustomFields\CustomFieldInterface [Example]
  2. Within di.xml define an additional argument for the Magento\Braintree\Model\CustomFields\Pool passing through an instance of your object [Example]