From 6fa7d19cf15402c53bfaa86c3d632452b3677c89 Mon Sep 17 00:00:00 2001 From: Felipe Siqueira Pinheiro Date: Wed, 18 Jan 2017 09:13:04 -0200 Subject: [PATCH] Fixed ipn.php SQL Inserts, more precisely, the row 'id' from znote_paypal table (#268) --- ipn.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ipn.php b/ipn.php index 0a7f8bf..95698ed 100644 --- a/ipn.php +++ b/ipn.php @@ -82,7 +82,7 @@ $custom = (int)$_POST['custom']; $connectedIp = $_SERVER['REMOTE_ADDR']; - mysql_insert("INSERT INTO `znote_paypal` VALUES ('', '$txn_id', 'Connection from IP: $connectedIp', '0', '0', '0')"); + mysql_insert("INSERT INTO `znote_paypal` VALUES ('0', '$txn_id', 'Connection from IP: $connectedIp', '0', '0', '0')"); $status = VerifyPaypalIPN(); if ($status) { @@ -113,7 +113,7 @@ // Verify that the user havent messed around with POST data if ($status) { // transaction log - mysql_insert("INSERT INTO `znote_paypal` VALUES ('', '$txn_id', '$payer_email', '$custom', '".$paidMoney."', '".$paidPoints."')"); + mysql_insert("INSERT INTO `znote_paypal` VALUES ('0', '$txn_id', '$payer_email', '$custom', '".$paidMoney."', '".$paidPoints."')"); // Process payment $data = mysql_select_single("SELECT `points` AS `old_points` FROM `znote_accounts` WHERE `account_id`='$custom';"); @@ -124,12 +124,12 @@ } } else { $pmail = $paypal['email']; - mysql_insert("INSERT INTO `znote_paypal` VALUES ('', '$txn_id', 'ERROR: Wrong mail. Received: $receiver_email, configured: $pmail', '0', '0', '0')"); + mysql_insert("INSERT INTO `znote_paypal` VALUES ('0', '$txn_id', 'ERROR: Wrong mail. Received: $receiver_email, configured: $pmail', '0', '0', '0')"); } } } } else { // Something is wrong - mysql_insert("INSERT INTO `znote_paypal` VALUES ('', '$txn_id', 'ERROR: Invalid data. $postdata', '0', '0', '0')"); + mysql_insert("INSERT INTO `znote_paypal` VALUES ('0', '$txn_id', 'ERROR: Invalid data. $postdata', '0', '0', '0')"); } -?> \ No newline at end of file +?>