I'm using Braintree with Craft Commerce using this Omnipay Braintree Gateway for Craft Commerce https://github.com/samuelbirch/craftcommerce-braintree
It's working well, but I noticed that some customer data is not passed through to Braintree at the time of a successful purchase. Specifically, the customer information that is mapped from the customer
parameters in the transactions sale call.
Working directly with Braintree API it would be done as part of the sale method that includes amount
and creditCard
etc on the transaction.
Braintree_Transaction::sale([...], array('customer' => array()));
I'm a bit stuck trying to find where to actually make a modification to pass this data through in the context of Omnipay and Craft Commerce. Does anyone have an idea of where to start? I realize this is a vague question... please comment if there is something specific that I can clarify to make this question more answerable.
Update:
It looks like maybe what I should be using is a Craft Commerce hook. Probably commerce_modifyGatewayRequestData
. So I'm starting there, but if anyone has tips it would be appreciated!