working on an auction site using phpprobid software and come to the point of integrating paypal payments for buyers to pay sellers for items. the form is like the code below, i can see the money being transferred from the buyer to the seller but the notify_url callback is not being run. the notify_url (used to mark item as paid for and other db operations) is accessible, not on localhost. are notify_url‘s called between two personal accounts? all the documentation only talks about personal to business transactions; does that mean to allow users to sell items and accept payment via paypal they need a business account?
this process worked in the sandbox so i know there are no errors in the script at notify_url, but there you need a simulated business account so this wasn’t an issue. i’ve added some mail() calls to the notify script so i can see it isn’t actually running. the transfers work and the return url appears after so that works too.
<form action="https://www.paypal.com/cgi-bin/webscr/" method="post" id="form_paypal">
<input name="submit" type="submit">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="bn" value="wa_dw_2.0.4">
<input type="hidden" name="business" value="Business Name">
<input type="hidden" name="receiver_email" value="paypal@SELLERSBUSINESS.com">
<input type="hidden" name="amount" value="SOME_AMOUNT">
<input type="hidden" name="currency_code" value="A_VALID_CURR_CODE">
<input type="hidden" name="return" value="OURSITE/RETURN_URL">
<input type="hidden" name="cancel_return" value="OURSITE/FAILED_URL">
<input type="hidden" name="item_name" value="DESCRIPTION_OF_ITEM">
<input type="hidden" name="custom" value="VALUE_TO_BE_SPLIT_FOR_SPECIFIC_DATA">
<input type="hidden" name="notify_url" value="OURSITE/CALLBACK_SCRIPT_URL">
</form>
tl;dr… if a paypal transaction is between two personal accounts, is the notify_url called?
IPN can be used with any type of account. Are you absolutely sure it’s not actually getting POSTed but your script has an issue so you don’t see the result?
You need to confirm this by checking your PayPal IPN History and your web server logs.
If PayPal IPN History shows nothing then you know the IPN’s aren’t getting sent at all. If it shows a 200 OK you know it’s getting sent and your server is returning a successful response that the script completed without error. If you see anything other than 200 OK you know there is an error happening with your script. You can check your web server logs to find the exact error.
You could also build yourself a simple test form with hidden variables that match what you expect to get from PayPal. Set the action of this form to your IPN listener and POST it directly. This way you can see the result on screen and this can help troubleshoot your issues.
Just keep in mind that when testing this way the data isn’t coming from PayPal, therefore, the validation will fail. You can adjust your code to handle this accordingly for testing purposes.