stjimmy Posted August 28, 2007 Share Posted August 28, 2007 Hi! Im trying to build a page where you can place ads for a small amount. First you have to pay and then you get to create your ad. But after creating the ad I always get the message that "the site has not received your payment" and users is unable to create ad. This is the area in the code that produces the error message: // Get the row from the users table if ( $ad_cost > 0 ) { $sql = "SELECT * FROM ". ADS_USERS_TABLE ." WHERE users_user_id = ".$userdata['user_id']; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); if ( !$row ) { message_die(GENERAL_ERROR, $lang['no_credit']); } // Check for sufficient credit if ( $ad_cost > $row['users_balance'] ) { message_die(GENERAL_ERROR, $lang['insuffient_credit']); } } // Create the ad $user_ip = $userdata['session_ip']; $time = time(); $expiry_date = mktime(0, 0, 0, date("m") + $ad_duration, date("d"), date("Y")); $status = 'active'; // Insert for the adverts table $sql = "INSERT INTO ". ADS_ADVERTS_TABLE ." (category, sub_category, ad_type_code, basic_ad_ind, standard_ad_ind, photo_ad_ind, premium_ad_ind, ad_cost, user_id, username, user_ip, time, title, short_desc, price, status, expiry_date, trade_ind, loc_id) VALUES ('$category', '$sub_category', '$ad_type_code', '$basic_ad_ind', '$standard_ad_ind', '$photo_ad_ind', '$premium_ad_ind', $ad_cost, '$user_id', '$username', '$user_ip', '$time', '$title', '$short_desc', '$price', '$status', '$expiry_date', '$trade_ind', '$locnum')"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not insert adverts row', '', __LINE__, __FILE__, $sql); } $id = $db->sql_nextid(); Since I am no programmer I dont know if this problem is related to the code or if this is a paypal issue thing. The money is in my account so that works, but the software still refuses to create an ad. I would appreciate any help! Quote Link to comment https://forums.phpfreaks.com/topic/67017-cant-get-paypal-to-work-with-page/ Share on other sites More sharing options...
stjimmy Posted August 28, 2007 Author Share Posted August 28, 2007 Anyone please? Quote Link to comment https://forums.phpfreaks.com/topic/67017-cant-get-paypal-to-work-with-page/#findComment-336241 Share on other sites More sharing options...
ball420 Posted August 28, 2007 Share Posted August 28, 2007 try pay pals forum i had a previous problem and got some good help from there. Quote Link to comment https://forums.phpfreaks.com/topic/67017-cant-get-paypal-to-work-with-page/#findComment-336249 Share on other sites More sharing options...
stjimmy Posted August 28, 2007 Author Share Posted August 28, 2007 Sadly they dont seem to be able to help me. They say: From what you described there is a problem in the program not recognizing the payment coming back. In you button code, you set an IPN script URL so that the program gets the information about the transaction? I dont know what to do. Quote Link to comment https://forums.phpfreaks.com/topic/67017-cant-get-paypal-to-work-with-page/#findComment-336599 Share on other sites More sharing options...
stjimmy Posted August 28, 2007 Author Share Posted August 28, 2007 Please, you can download the phpbb add-on here: http://www.icyphoenix.com/download.php?id=546 I dont know whats wrong :'( Quote Link to comment https://forums.phpfreaks.com/topic/67017-cant-get-paypal-to-work-with-page/#findComment-336664 Share on other sites More sharing options...
stjimmy Posted August 28, 2007 Author Share Posted August 28, 2007 Pretty, pretty please. Quote Link to comment https://forums.phpfreaks.com/topic/67017-cant-get-paypal-to-work-with-page/#findComment-336745 Share on other sites More sharing options...
stjimmy Posted August 29, 2007 Author Share Posted August 29, 2007 Think I might be missing a ipn_success.php file or something. Anyone heard of this? Quote Link to comment https://forums.phpfreaks.com/topic/67017-cant-get-paypal-to-work-with-page/#findComment-337268 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.