braintree_ruby icon indicating copy to clipboard operation
braintree_ruby copied to clipboard

`international_phone` property when capturing transaction is not allowed

Open taylorthurlow opened this issue 1 year ago • 0 comments

General information

  • SDK/Library version: 4.22.0
  • Environment: Sandbox
  • Language, language version, and OS: Ruby 3.3, macOS

Issue description

When attempting to pass more data for advanced fraud protection when creating a transaction, including a value for customer[international_phone][country_code] and customer[international_phone][national_number] (docs) is raising an exception due to their presence. The linked documentation suggests that international_phone should be used instead of the deprecated customer[phone] field, but it doesn't appear that customer[international_phone] is allowed in the call to #sale.

ArgumentError:
       invalid keys: customer[international_phone][country_code], customer[international_phone][national_number]
     # /Users/taylor/.rbenv/gems/3.3.0/gems/braintree-4.22.0/lib/braintree/util.rb:123:in `verify_keys'
     # /Users/taylor/.rbenv/gems/3.3.0/gems/braintree-4.22.0/lib/braintree/transaction_gateway.rb:20:in `create'
     # /Users/taylor/.rbenv/gems/3.3.0/gems/braintree-4.22.0/lib/braintree/transaction_gateway.rb:108:in `sale'
     ...

The customer[phone] property works as expected but based on the documentation it's not really clear that it will continue to work going forward.

taylorthurlow avatar Oct 14 '24 19:10 taylorthurlow