Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I don't access some fields in transaction.paypal_details #218

Closed
frankyston opened this issue Jul 7, 2021 · 1 comment
Closed

I don't access some fields in transaction.paypal_details #218

frankyston opened this issue Jul 7, 2021 · 1 comment

Comments

@frankyston
Copy link

General information

  • SDK/Library version: 3.1.0
  • Environment: Sandbox
  • Language, language version, and OS: Ruby, 2.7.2, Ubuntu with Docker

Issue description

Today I make a payment request by wallet and receive the customer's nonce on the front-end through the paypal button.

On the backend I make the transaction.sale call and get a transaction object.

When trying to access the tax_id and tax_id_type attributes I get an undefined method error.

Below is an example:

Some values below have been changed to not reveal true information.

[33] pry(#<Providers::Eletronic::Paypal::Client>)> a = @provider_data.transaction.paypal_details
=> #<Braintree::Transaction::PayPalDetails:0x0000aaaabe5260c0
 @app_used_for_scanning=nil,
 @authorization_id="XXXXX",
 @billing_agreement_id=nil,
 @capture_id="XXXXX",
 @cobranded_card_label=nil,
 @custom_field=nil,
 @debug_id="YYYYY",
 @description=nil,
 @global_id=nil,
 @graphql_id=nil,
 @image_url="https://assets.braintreegateway.com/payment_method_logo/paypal.png?environment=sandbox",
 @implicitly_vaulted_payment_method_global_id=nil,
 @implicitly_vaulted_payment_method_token=nil,
 @payee_email=nil,
 @payee_id=nil,
 @payer_email="teste@teste.example.com",
 @payer_first_name="John",
 @payer_id="XXXXX",
 @payer_last_name="Doe",
 @payer_phone=nil,
 @payer_status="VERIFIED",
 @payment_id="PAYID-XXXEEEEE33333",
 @paypal_retail_transaction_id=nil,
 @paypal_retail_transaction_lookup_url=nil,
 @paypal_retail_transaction_refund_url=nil,
 @paypal_retail_transaction_status=nil,
 @refund_from_transaction_fee_amount=nil,
 @refund_from_transaction_fee_currency_iso_code=nil,
 @refund_id=nil,
 @selected_financing_currency_code=nil,
 @selected_financing_discount_percentage=nil,
 @selected_financing_term=nil,
 @seller_protection_status="ELIGIBLE",
 @shipping_option_id=nil,
 @tax_id="232323232323",
 @tax_id_type="BR_CPF",
 @token=nil,
 @transaction_fee_amount="0,86",
 @transaction_fee_currency_iso_code="BRL">
[34] pry(#<Providers::Eletronic::Paypal::Client>)> a.tax_id
NoMethodError: undefined method `tax_id' for #<Braintree::Transaction::PayPalDetails:0x0000aaaabe5260c0>
from (pry):35:in `create_in_provider'
[35] pry(#<Providers::Eletronic::Paypal::Client>)> a.tax_id_type
NoMethodError: undefined method `tax_id_type' for #<Braintree::Transaction::PayPalDetails:0x0000aaaabe5260c0>
from (pry):36:in `create_in_provider'
[36] pry(#<Providers::Eletronic::Paypal::Client>)> a.image_url
=> "https://assets.braintreegateway.com/payment_method_logo/paypal.png?environment=sandbox"
@hollabaq86
Copy link
Contributor

this is fixed in 4.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants