Jump to content

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

I'm sure they are also, but I am also as sure that they can point out the problem much faster than ourselves.  Being that A: They know their system, and B: They will get you up and running much faster so they can get some of your money.

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.