#dishant_api

1 messages ยท Page 1 of 1 (latest)

spiral cobaltBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1233398414268694650

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

round novaBOT
lilac horizon
#

hi there!

shy wren
#

Hi

lilac horizon
shy wren
#

Yes but that I got after I call for retreival
before retrieval is it possible?

#

this is my code and in service.Get() line I am getting exception
becuase I am using live key to get test mode transaction

round novaBOT
shy wren
#

So the scenario is like this when ever this kind of mis match request occure I want to display cusotm message to customer that this is wrong key you provided

lilac horizon
#

before retrieval is it possible?
no. but I guess if you can retrieve it with a test key, then it means it was in test mode

#

test mode object can only be retrieved with a test key. live mode object can only be retrived with a live key

shy wren
#

Does stripe provide such flag or something so I kind of know before making the request?

lilac horizon
#

no. that's something that you need to keep track on your end.

#

ideally you should have different environement so you don't mix up test and live objects.

shy wren
#

yes, I know but my client want something like this which I described you

lilac horizon
#

and I told you it's not possible

shy wren
#

Though we have diff env files

shy wren
lilac horizon
#

by only looking at the ID you cannot know if it's test or live mode. you need to actually retrieve the object to know.

shy wren
#

correct
no worries I got a way
I'll handle exception and then bind custom message

#

๐Ÿ˜

#

Thanks for the clarification