Jump to content

PayPal Sandbox IPN, does it work?


Guest zosont

Recommended Posts

Can anyone confirm to me whether the IPN feature works using the paypal sandbox?

Looking at my access logs paypal has accessed the Paypal/ipn.php file when a payment goes through, however it is certainly not updating the database and consequesntly the order status does not change and the redirect shows unsuccessful because no sec_order_id has been added to the db.

I have added to ipn.php a few lines that write some of the variables to a file, to try and help me debug what is happening. the strange thing is, this file is written to if I access the ipn.php directly myself, however is not written to when paypal has presumably accessed it.

Any thoughts or ideas would be wonderful. People must have this working correctly, if so, have you had to change anything at all to make it work?

I'm using cubecart version 3.0.6 with PHP 5.04 on IIS 6. The only modification I have made to the ipn.php file is to declare the $header variable, as in php5 undeclared variable use throws up errors.

Thanks

Nick

Link to comment
Share on other sites

As has been hashed and rehashed around here, the PayPal IPN Sandbox does NOT work. :sourcerer:

;)

I did get that impression, it was just unclear whether it was old news. Thanks, for the quick response, I'll try it with real accounts.

Link to comment
Share on other sites

Okay, I am now trying it with real paypal accounts, and one penny transactions, but exactly the same thing is happening. Basically, although the access logs show that an Ebay registered IP address has accessed the ipn.php page with a POST just before my own IP address appears accessing confirmed.php (as I imagine it should look), the database has not been updated with the paypal transaction id and the order status has not been changed from 1 to 2.

I have tried the scenario with my extra code on ipn.php for writing a debug log out to a file. this doesn't write anything when paypal accesses the page, but does if I access it directly in a browser. This is the most confusing part because I am really out of debugging ability without this. And yes, I have also tried it without my extra code and the same thing happens.

So have you any ideas, or have you any thoughts on how I can try and debug the problem without ever being able to see what is going on when the ipn page is parsed?

;)

cheers

Link to comment
Share on other sites

I have to hold my hands up here to being entirely to stupid.

I have been developing the site within a secure folder, requiring HTTP authentication. I have the details saved in my browsers so haven't had to authorise for weeks, therefore the obvious has completely slipped my mind.

What is it, can't see the wood for the trees? anyway. In case anyone else is of similarly unfortunate IQ as me, turn any secure folders off or paypal IPN will not work!!!

Thanks Sir Bill for your input.

Link to comment
Share on other sites

If anyone is interested, I have PayPal IPN working with Sandbox.

Just change the penultimate if statement argument on transfer.inc.php from

if($module['method']=="std" ){

	$transfer = "auto";

	$stateUpdate = TRUE;

	



}


to


if($module['method']=="std" || $module['testMode']==1){

	$transfer = "auto";

	$stateUpdate = TRUE;

	



}

If there are any problematic side effects for me changing the stateUpdate variable I would love to know, but I figure for testing purposes it is just nice to have everything else working.

Link to comment
Share on other sites

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.   Paste as plain text instead

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