From 40769fae05f04834fe9180fc2c367b0ce5c90f4e Mon Sep 17 00:00:00 2001 From: Halil Beycan <50718965+BeycanDeveloper@users.noreply.github.com> Date: Fri, 22 Mar 2024 21:41:46 +0800 Subject: [PATCH] updated --- app/Gateways/AbstractGateway.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) {