Jump to content

Paypal IPN Weird


JohnOP

Recommended Posts

Hi im looking for some help on the paypal IPN, i am creating a subscrtiption page on my forums and am having trouble with paypal.

 

Here is the relevant part of the ipn code

 

if ($payment_status=="Completed"){
if ($payment_currency=="USD"){
if ($payment_amount == "$5.00"){


define("IN_MYBB", "1");
require("./global.php");
$db->update_query("users", array("usergroup" => "8"), "`uid` = '$custom'");


}
}
}

 

Now when i run that in the sandbox it works fine and upgrades the account however when i try it with a real payment from the form it doesnt work which is realy weird.

 

					<form action='https://www.paypal.com/cgi-bin/webscr' method='POST'>
      	<input type='hidden' name='cmd' value='_xclick'>
				<input type='hidden' name='business' value='EMAIL' />
				<input type='hidden' name='item_name' value='MyBB Subscription for USERNAME, [uID]'>
				<input type='hidden' name='custom' value='USERS UID' />
				<input type='hidden' name='image_url' value='' />
				<input type='hidden' name='no_shipping' value='1' />
				<input type='hidden' name='notify_url' value='SITE ADDRESS' />
				<input type='hidden' name='return' value='SITE ADDRESS />
				<input type='hidden' name='cancel_return' value='SITE ADDRESS' />
				<input type='hidden' name='bn' value='PP-SubscriptionsBF' />
				<input type='hidden' name='amount' value='5.00'>
				<input type='hidden' name='currency_code' value='USD' />
  <input type='image' src='https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif' border='0' alt='PayPal - The safer, easier way to pay online!'>
  	  <img alt='' border='0' src='https://www.paypal.com/en_US/i/scr/pixel.gif' width='1' height='1'>
    </form>

 

I don't see why it would work in the sandbox and not on the real form any help will be much appreciated.

Link to comment
https://forums.phpfreaks.com/topic/253323-paypal-ipn-weird/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.