#ndbtss_api

1 messages ¡ Page 1 of 1 (latest)

red lotusBOT
#

👋 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/1435172843175542898

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

storm tulip
red lotusBOT
quaint pulsar
#

ok but when i m not in the webhook, when i m using api in backend(java) and i m waiting for the response i want something else that status in string

plush badge
#

Hey! Taking over for my colleague. Why the status isn't enough for you ?

#

Can you share more details please ?

quaint pulsar
#

because all my logic is based on that "succeeded" string
if one day stripe decides to change the name of the status, all my payments will fail becaus i always compare teh paymentIntent.getStatus() with "succeeded"
Like in this code for exemple:

public final String STRIPE_STATUS_SUCCEED = "succeeded";

if(!STRIPE_STATUS_SUCCEED.equalsIgnoreCase(paymentIntent.getStatus())) {
tp.setInternalPaymentStatus(InternalPaymentStatus.ERROR.getId());
tp.setErrMsg("ERR Stripe - Payment - " + paymentIntent.getStatus());
}
else {
tp.setInternalPaymentStatus(InternalPaymentStatus.SUCCESS.getId());
}

#

if stripe decides to change to "successfull" it will enter the "if" clause

plush badge
#

if this change, it will lead to a breaking change. So if you don't change your API version, that status will never change

#

So you can rely on it

red lotusBOT
quaint pulsar
#

thank you