question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

4.x not possible to get list if payment methods (list of nonces)

See original GitHub issue

General information

  • SDK/Library version: 4.7.0 / 4.8.0
  • Environment: any
  • Android Version and Device: any
  • Braintree dependencies:
    braintreeVersion = "4.8.0"
// Braintree
    // https://github.com/braintree/braintree_android/releases

    // https://github.com/braintree/braintree-android-drop-in/releases
    implementation "com.braintreepayments.api:drop-in:6.0.0-beta2"

    // to offer card payments
    implementation "com.braintreepayments.api:card:$braintreeVersion"
    // to collect device data
    implementation "com.braintreepayments.api:data-collector:$braintreeVersion"
    // to offer PayPal
    implementation "com.braintreepayments.api:paypal:$braintreeVersion"
    // to offer local payments
    implementation "com.braintreepayments.api:local-payment:$braintreeVersion"
    // to offer Google Pay
    implementation "com.braintreepayments.api:google-pay:$braintreeVersion"
    // to perform 3DS verification
    // https://developer.paypal.com/braintree/docs/guides/3d-secure/client-side/android/v4
    implementation "com.braintreepayments.api:three-d-secure:$braintreeVersion"

Issue description

I need to get a list of all available payment methods for user to show custom payment list. In v3 we uses PaymentMethodNoncesUpdatedListener but with v4 methods to get list DropInClient.getPaymentMethodNonces is private. PaymentMethodClient is private too, so how I should get list of nonces?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mtrakalcommented, Apr 7, 2022

Hi @sarahkoop for me/our company (as the author of this issue) should be fine when you create these two methods public. It would be nice and solve our issues with the integration of v4 😍🙏. We use Drop-in, so I’m ok with this quick-fix solution.

1reaction
sarahkoopcommented, Apr 6, 2022

Hi @dlitvik and @josemifever - Thanks for your patience on this. We are trying to determine the best approach to provide this functionality in a way that is compatible with our existing SDKs and that meets your needs.

Like Steven mentioned previously, this functionality was moved to our Braintree Android Drop-in SDK and made non-public, since it is used primarily by our internal SDK. It is my understanding that you need the ability to fetch vaulted payment methods and delete vaulted payment methods, correct?

Would adding methods to DropInClient to invoke PaymentMethodClient.getPaymentMethodNonces and PaymentMethodClient.deletePaymentMethod be an acceptable solution for your integrations? This would require you to pull in the com.braintreepayments.api:drop-in library and instantiate a DropInClient, in addition to the using the core SDK libraries.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Payment Method Nonces - Braintree Developer Documentation
A payment method nonce is a secure, one-time-use reference to payment information. It's the key element that allows your server to communicate sensitive ......
Read more >
Braintree: test nonces are resulting in Payment Method Nonce ...
This is the error I am receiving when I make me call to gateway.subscription.create: [ ValidationError { attribute: 'payment_method_nonce', code ...
Read more >
Vaulting a Payment Method | Braintree GraphQL API
How to Vault A Payment Method. This guide provides instructions for vaulting a single-use payment method, storing it for future use. Once vaulted,...
Read more >
Stripe API reference – List PaymentMethods – curl
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries....
Read more >
Dropin - Documentation - Braintree Open Source
Instances of this class have methods for requesting a payment method and subscribing ... Get a list of the available payment methods presented...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found