Braintree Checkout add custom field
What I want to do is add a custom field for the Card Holder Name which is not included by default. According to their support, the way to do that is
add a standard form inputs inside your form, then they'd be passed together in your POST variable
The code example they provide for passing custom fields:
$customerCreation = Braintree_Customer::create([ 'firstName' => $_POST['firstName'], 'lastName' => $_POST['lastName'], 'email' => $_POST['email'], 'phone' => $_POST['phone'], 'paymentMethodNonce' => $_POST['payment_method_nonce'], 'creditCard' => [ 'billingAddress' => [ 'firstName' => $_POST['firstName'], 'lastName' => $_POST['lastName'], 'streetAddress' => $_POST['billingStreetAddress'], 'locality' => $_POST['billingCity'], 'region' => $_POST['billingState'], 'postalCode' => $_POST['billingPostal'] ] ] ]);
- happens to be a Customer Create call, but the concept is similar
Can you deduce from the above whether it is or not possible to send custom fields to Braintree without hacking Perch's core?
I understand this is something outside your support boundaries in any case. If this is absolutely not possible, is there any other way I could at least save this field in Perch instead of sending it to Braintree?
Many thanks in advance!!