diff --git a/app/Gateways/AbstractGateway.php b/app/Gateways/AbstractGateway.php index 45418ed..77e6628 100644 --- a/app/Gateways/AbstractGateway.php +++ b/app/Gateways/AbstractGateway.php @@ -167,11 +167,10 @@ public function is_ready(): bool */ public function setup_payment(): void { - if (empty($_POST['productId'])) { + if (!$productId = isset($_POST['productId']) ? absint($_POST['productId']) : 0) { return; } - $productId = absint($_POST['productId']); $product = Product::find($productId); if (!$product) {