gravityplus / gravity-forms-braintree

Braintree Gravity Forms Add-On
https://wordpress.org/plugins/gravity-forms-braintree/
3 stars 13 forks source link

Allow pass-though of Billing Address #20

Closed lukerollans closed 8 years ago

lukerollans commented 9 years ago

Users are reporting the need to piggyback Billing Address details through to Braintree. This is a good idea, especially if its a requirement for certain Braintree merchants.

Discussions on WP.org https://wordpress.org/support/topic/duplicate-transaction-checking https://wordpress.org/support/topic/payments-getting-declined-because-of-lack-of-billing-address-field

lkraav commented 9 years ago

Thanks for getting back to me on support forums. +1000 to going forward with github.

darknesscoder commented 9 years ago

@lukerollans I've done a bit of modification to send billing information which you might be interested in:

'customer' => array(
    'firstName' => $submission_data['card_name']
    ),
    'billing' => array(
    'firstName' => $submission_data['card_name'],
    'streetAddress' => $submission_data['address'],
    'locality' => $submission_data['city'],
    'postalCode' => $submission_data['zip']
    )
    );

Beside that I commented the line you set to remove the Billing Address mapping in the feed: //$settings = $this->remove_field( 'billingInformation', $settings );

lukerollans commented 9 years ago

@darknesscoder Thanks! It is possible for you to send in a PR so that others could benefit, as I'm still not sure when I will be able to get around to doing it myself :)

darknesscoder commented 9 years ago

@lukerollans You're welcome! I've sent a pull request

lukerollans commented 8 years ago

Implemented in #21. Will be on WP.org repo shortly