Video yükleniyor...
Video Yüklenemedi
A backend practice that might crash your system.
33,065 görüntüleme • 7 ay önce •via X (Twitter)
19 Yorum

Bro, just let your Db handle the unique constrain on create before debit.

This is quite safe but can still easily be hacked 🥲.

Hmm

🎥/tk: @tobio133

This code sef isn’t safe enough

skill issue , your database design should handle this !

How

Good stuff. I recently wrote something on the same. Let us talk about idempotency.

He didn't explain this well enough. But okay.

Fintech engineers, i greet una😂😂

I nearly got wrecked by this. Thank God my user reported the bug on time.

Everything is pay pay pay pay pay can’t you guys ever code anything else ?

More of that waiting for me tomorrow morning 🥺

I'd recommend 2-phase commit

🙏

Let's connect

Sharrrrppppp

The principle of idempotency when dealing with payments or checkout: Your system must return the same result when given the same input. So here a payment exists just return 200 or 201. This useful for situations where a payment request is sent more than once.

This is not idempotency. You are simply returning everything response to the caller. That is not what idempotency is about.
