#Chen - NPE
1 messages ยท Page 1 of 1 (latest)
The code is something like this:
cardId,
CardRetrieveParams.builder().apply {
addExpand("number")
addExpand("cvc")
}.build(),
RequestOptionsBuilder().build()
)
Is the above stacktrace the complete stacktrace? If there's more, can you share the whole thing even if it's messy
The additional stack trace basically points to the code sample above.
That's all the trace related to Stripe SDK.
๐ Hello - hopping in to help
karbi!! Good to see you here!
Can you try something out really quick for me? What happens if you retrieve the physical card, but remove the addExpand lines?
no rush!
public static Card retrieve(String card, RequestOptions options) throws StripeException { interface throws NPE for both the physical card and the virtual card.
Same result if I call public static Card retrieve(String card, Map<String, Object> params, RequestOptions options) throws StripeException { but with an empty map as params.
Hmm... didn't you say it worked with the virtual card before? Is it suddenly not working?
The only working scenario is calling public static Card retrieve(String card, Map<String, Object> params, RequestOptions options) throws StripeException but with the two expand params
for virtual cards
hmm... let me try some things out on my end. I have some guesses, but need to try it for myself
What does your import for Card look like?
com.stripe.model.issuing.Card
and what happens when you try this:
Card card = (Card) Card.retrieve(cardId);
Oh interesting. Let me see
We are on Kotlin so actually I'm not sure what's the right syntax for that.
I tried Card.retrieve(...) as Card but I guess that's not the same.
Oh dang it - I'm not familiar with Kotlin so I don't know what the exact syntax is ๐ฆ
But the stack trace shows com.stripe.model.issuing.Card.retrieve(Card.java:292) is called, so it should be calling the right interface, right?
Yeah that's true - let me check around to see if any of my teammates are more familiar with kotlin and can help
Thank you
Hi @unborn sundial ๐ I'm jumping in to help out. I must be honest, I've only ever come across Kotlin in the context of Android programming.
Hi hi! Welcome to the party ๐
Can you clarify what platform you're developing on?
microservice
Okay so you are doing this server-side and using the stripe-java client library. Alright. Would you be able to share a request ID each of a successful Virtual Card look up and a failed Physical Card look up?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Checking
Hi sorry, looks like I was using the wrong config file. After an update the request went through.
Sorry about the confusion.
๐ great to hear it!
Sometimes it just takes talking the issue through and taking a second look.
yea it's super helpful to check the request id. That's when I realized the requests were actually not being sent out ๐