Ad
Does Laravel Cashier Handle Race Condition?
Does Laravel Cashier handle race condition?
//code to charege some amount
$stripeCharge = $user->charge(100);
The call could succeed, but the connection break before the stripe server can tell about it.
Now in this case, How does Cashier Package handle this?
Ad
Answer
Stripe allows you to handle such scenarios by passing idempotency keys on your requests.
The API supports idempotency for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response.
https://stripe.com/docs/api/idempotent_requests?lang=php
From the looks of it, this feature is not yet implemented in Cashier, see the open issue
Support Idempotency Option
Ad
source: stackoverflow.com
Related Questions
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS - Conditionally Load a Different Page
- → Make a Laravel collection into angular array (octobercms)
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
- → Validating fileupload(image Dimensions) in Backend Octobercms
- → OctoberCMS Fileupload completely destroys my backend
- → How do I call the value from another backed page form and use it on a component in OctoberCms
Ad