#marcus_api

1 messages · Page 1 of 1 (latest)

left garnetBOT
#

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

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

last forge
#

hi there!

#

for some reason when I open you link I'm redirected to an ad. so I can't really see your code.

#

but can you share more details about your issue? did you actually try your code? is it working? if not, what is the exact issue, like do you get an error message?

#

and I don't see how I could (easily) test this at the moment.
you could test it in test mode. what's the exact issue?

long socket
#

As I wrote in the description - I have a webhook, that is called for every refund.

last forge
#

yes, I tried opening that link, but I can't see your code.

long socket
#

Sometimes in the past, I accidentally create refunds without a creditnote attached

#

so I wrote this code, that will check if the refund has a credit note attached, if not, create a credit note and attach the refund to it

#

then I can never fuck up again 😉

#

I wrote this, now with the new api version, it got more complex, so I wanted to ensure my code truly works

last forge
#

well, next step is to test your code on the new API version.

long socket
#

well, since I dont have any refunds at the moment, especially non without a credit note.. that's difficult

last forge
#

you should test this in test mode, and create refunds in test mode.

#

that's what test mode (or sandbox) is for: testing your code before pushing it to production with real payments/refunds.

long socket
#

Can you please check my code and tell me if generally it looks correct or not?

#

For instance, I use this together with another tax related api.. and they don't have a test system at all.

last forge
#

sorry we can't really review code. and even if I had the time, I can make mistakes.
the solution here is simply to test your code in test mode, and see if everything works as expected or not.

#

why don't you want to use test mode or sandbox? do you need help setting that up?

left garnetBOT
fickle river
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

long socket
#

Version changes cannot be made in test mode—switch to live mode to upgrade or rollback.

#

see the shit. This cant even be done 😦

fickle river
#

Right, the recommended way to test code in an API upgrade is to pass the Stripe-Version headers ensuring that everything works end-to-end

#

Only then once that is fine should you upgrade your account default

long socket
#

what do you have a test system for if I can't make use of it from my test system? 😦

fickle river
fickle river
#

But the recommended way is to use Stripe-Version head as I noted

long socket
#

The default API version has always been cross-environment. => Yes, it has always the been the same shit. Which is why I wanted to ask here if it looks okayish, and then YOLO and see if it works, or rollback quickly if it doesn't