I work at Braintree. If you need more help, feel free to reach out to our support team.
Your form isn't gathering billing address info, just shipping address info. If you change shipping
to billing
or add another section:
<fieldset>
<legend>billing Information</legend>
<div class='large-6 columns'>
<%= label_tag 'transaction[billing][first_name]', "First Name" %>
<%= text_field_tag 'transaction[billing][first_name]' %>
</div>
<div class='large-6 columns'>
<%= label_tag 'transaction[billing][last_name]', "Last Name" %>
<%= text_field_tag 'transaction[billing][last_name]' %>
</div>
<div class='large-12 columns'>
<%= label_tag 'transaction[billing][street_address]', "Address Line 1" %>
<%= text_field_tag 'transaction[billing][street_address]' %>
</div>
<div class='large-12 columns'>
<%= label_tag 'transaction[billing][extended_address]', "Address Line 2" %>
<%= text_field_tag 'transaction[billing][extended_address]' %>
</div>
<div class='large-4 columns'>
<%= label_tag 'transaction[billing][locality]', "City" %>
<%= text_field_tag 'transaction[billing][locality]' %>
</div>
<div class='large-4 columns'>
<%= label_tag 'transaction[billing][region]', "State" %>
<%= text_field_tag 'transaction[billing][region]' %>
</div>
<div class='large-4 columns'>
<%= label_tag 'transaction[billing][postal_code]', "Zip Code" %>
<%= text_field_tag 'transaction[billing][postal_code]' %>
</div>
</fieldset>
the resulting transaction will have a transaction.billing_details
attribute:
transaction.billing_details
The billing address details used to process this transaction. If billing address was stored in the Vault, then the billing_address_details is a snapshot of the address in the Vault at the time the transaction was created. So if the address in the Vault is updated after the transaction is created, transaction.billing_address_details.postal_code will return the previous postal code that was used to process the transaction, while transaction.vault_billing_address.postal_code will return the current postal code for the address in the Vault.
The address details are similar to those found on the address details page.
transaction.billing_details.company
transaction.billing_details.country_code_alpha2
transaction.billing_details.country_code_alpha3
transaction.billing_details.country_code_numeric
transaction.billing_details.country_name
transaction.billing_details.extended_address
transaction.billing_details.first_name
transaction.billing_details.last_name
transaction.billing_details.locality
transaction.billing_details.postal_code
transaction.billing_details.region
transaction.billing_details.street_address