I've been working on Paypal IPN for a week on and off now getting no where fast really so I'm getting desperate. Right now I'm at a point where I can test my IPN script using Sandbox tool and I get INVALID response.
Or we can use Buynow button here...
and that doesnt cause a POST to my IPN script! I'll show the code for it below.
Anyone got any ideas why after the BuyNow process, confirming the transaction on Paypal, Paypal would not POST to my IPN? Once I get that sorted I will move on to figuring out why every response is INVALID.
This is the main variables for the buynow button...
/* Add variables to Form PARAMTERS MUST ADHERE TO PAYPAL STANDARDS */
$buyNow->addVar('business','firstname.lastname@example.org'); /* Payment Email */
$buyNow->addVar('item_name','Ad-Hit Points 500');
$buyNow->addVar('no_shipping','2'); /* Must provide shipping address */
$buyNow->addVar('rm','2'); /* Return method must be POST (2) for this class */
$buyNow->addVar('custom','500');/* Ad-Hit POINTS being bought */
/* Paypal IPN URL - MUST BE URL ENCODED and is the checkpayment.php file */
/* Set URL for Thank you Page (if any) in variable */
This is the top of my IPN script, checkpayment.php I have put an mail there to test its use. It only gets this far when testing through the sandbox not when using my buynow button...
mail('email@example.com', "TEST checkpayment Run", "checkpayment.php was accessed during this transaction");
/* Get Paypal Class */
/* Paypal is name of the Class */
$doCheck = new Paypal;