Skip to content

Commit faf6a85

Browse files
committed
chore: remove stripe webhook lock mechanism
1 parent b2c6671 commit faf6a85

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

app/Http/Controllers/PaymentGatewayWebHookController.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use App\Services\Model\IProcessPaymentService;
1717
use App\Services\Model\ISummitOrderService;
1818
use Illuminate\Http\Request as LaravelRequest;
19-
use Illuminate\Support\Facades\Cache;
2019
use models\oauth2\IResourceServerContext;
2120
use models\summit\IPaymentConstants;
2221
use models\summit\ISummitRepository;
@@ -124,11 +123,6 @@ public function genericConfirm($application_type, LaravelRequest $request){
124123
return $this->error412("cart id is null");
125124
}
126125

127-
$lock = Cache::lock("stripe:pi:{$cart_id}", 30); // 30s is enough
128-
if (!$lock->get()) {
129-
Log::warning("PaymentGatewayWebHookController::genericConfirm Skip concurrent webhook for {$cart_id}");
130-
return $this->ok(); // idempotent no-op
131-
}
132126
Log::debug(sprintf("PaymentGatewayWebHookController::genericConfirm cart id %s processing payment.", $cart_id));
133127

134128
$service->processPayment($payload);
@@ -196,11 +190,6 @@ public function confirm($summit_id, $application_type, LaravelRequest $request){
196190
return $this->error412("cart id is null");
197191
}
198192

199-
$lock = Cache::lock("stripe:pi:{$cart_id}", 30); // 30s is enough
200-
if (!$lock->get()) {
201-
Log::warning("PaymentGatewayWebHookController::confirm Skip concurrent webhook for {$cart_id}");
202-
return $this->ok(); // idempotent no-op
203-
}
204193
Log::debug(sprintf("PaymentGatewayWebHookController::confirm summit %s cart id %s processing payment.", $summit_id, $cart_id));
205194
$service->processPayment($payload, $summit);
206195
return $this->ok();

0 commit comments

Comments
 (0)