• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Error database Shop Gesior TFS 1.3

nanduzenho

Member
Joined
Mar 21, 2021
Messages
187
Solutions
1
Reaction score
15
GitHub
nanduzenho
Good morning, my gesior shop system is not working properly. I can make the first purchase of the item, but the second time, I can't activate the item for the character to receive. I noticed that in the database, in z_shop_payment, the columns are getting the same id. Does anyone know how I solve this problem??

z_shop_payment:
erro database.PNG
Shop.php
PHP:
            if(empty($services_errors)) {               
                if( $_SERVER['REQUEST_METHOD']=='POST' ) {
                    $hash = md5( implode( $_POST ) );           
                    if( isset( $_SESSION['hash'] ) && $_SESSION['hash'] == $hash ) {       
                        // Refresh! Não faz nada ou re-exibe o formulário preenchido           
                    } else {           
                        $_SESSION['hash']  = $request;
                        
                        if($sendTo == "friend") {
                            $add_order = $SQL->query("INSERT INTO `z_shop_payment` (`account_name`,`service_id`,`service_category_id`,`payment_method_id`,`coins`,`status`,`date`,`gift`) VALUES ('$account_name','$service_id','$serviceCategoryID','$payment_method','$service_points','gift','$orderDate','0')");
                            $add_friend = $SQL->query("INSERT INTO `z_shop_payment` (`account_name`,`service_id`,`service_category_id`,`payment_method_id`,`coins`,`status`,`date`,`gift`) VALUES ('$friend_acc','$service_id','$serviceCategoryID','$payment_method','$service_points','ready','$orderDate','1')");
                        } else {
                            $add_order = $SQL->query("INSERT INTO `z_shop_payment` (`account_name`,`service_id`,`service_category_id`,`payment_method_id`,`coins`,`status`,`date`,`gift`) VALUES ('$account_name','$service_id','$serviceCategoryID','$payment_method','$service_points','ready','$orderDate','0')");
                        }                           
                        $account_logged->setPremiumPoints($debitPoints);
                        $account_logged->save();
                    }
                }
            }
 
Back
Top