Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBeycan committed Mar 22, 2024
1 parent c30c141 commit 40769fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Gateways/AbstractGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 40769fa

Please sign in to comment.