#asim_1

1 messages · Page 1 of 1 (latest)

frail bloomBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • asim_1, 5 days ago, 19 messages
  • asim_1, 6 days ago, 12 messages
  • asim_1, 6 days ago, 14 messages
timber harness
#

When do you want it? Before making a payment (never reach backend)?

craggy forum
#

Using setup intent. I want it in the onPaymentSheetResult function.

#

However trying to access the field throws NPE.

#

result.getPaymentMethod().card

#

result.getPaymentMethodId() returns a proper result but the fields without getters are causing issues.

timber harness
#

What do you get via getPaymentMethod() specifically?

craggy forum
#

An NPE.

#

What I want to get is the last 4 and the drawable for the card logo (or the code for card type so i can use my own drawable).

timber harness
#

Can you provide the log or screenshot? What is NPE?

craggy forum
#

NPE = null pointer exception. As you can see above, the result.getPaymentMethod() function returns a null.

#

@timber harness stripe documentation suggests the same method to retrieve last4 but for some reason its not working on Android

timber harness
#

Can you share you full code?

craggy forum
#

paymentMethod comes up as null so I'm not using it.

#

Your DocsAI suggests a code but those classes aren't available in the SDK for some reason: