#ruslan-kazmiryk_code

1 messages ¡ Page 1 of 1 (latest)

pliant fableBOT
uncut belfryBOT
#

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.

pliant fableBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1248252452952604712

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

bitter pewter
#

Hi, let me help you with this.

#

Where did you see an example using .save()?

viral wadi
#

related to any kind of objects in code

#

to save chages done on such objects

#

I haven't yet known does it work with Stripe objects.

bitter pewter
#

You can only update Stripe objects by sending an update request. However, Checkout Sessions are not editable.

viral wadi
#

Otherwise it won't save changes (evidenced on that)

#

Ok, could you please help me with that?

bitter pewter
#

What are you trying to achieve, on the high-level? Maybe I could suggest a workaround.

viral wadi
#

for test function mine

#

specifically

viral wadi
#

as I mentioned above

#

You can see my codebase

#

or code chunck

bitter pewter
#

As I mentioned, you can't modify the Checkout Session object in Stripe.

#

You can only update its status by simulating making a payment.

viral wadi
#

can you suggest alternatives?

#

in clear understandable way

#

just as you see my test code

#

above

viral wadi
bitter pewter
#

Yeah, it's not something you can simulate for automated tests, unfortunately. You will have to run your tests by mocking your Stripe integration.

viral wadi
#

how can I make this within test function

viral wadi
#

no other options accessible in my case?

#

for my purposes

bitter pewter
#

No, unfortunately.

viral wadi