PayPal IPN no redirect PayPal IPN no redirect
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

PayPal IPN no redirect

Started by BillyWardrop, March 02, 2010, 04:41:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BillyWardrop

Hi

I've tried adding the $header_location code to my photo_shop_paypal_ipn.php file but it just takes me back to the home page of my gallery. When I click my orders, my image is set to unpaid even though I paid for it.

My Gallery address is http://www.petehumephotography.co.uk/photogallery/


My code is as follows:


   case 'return':

      $header_location = (@preg_match('/Microsoft|WebSTAR|Xitami|Unix/', getenv('SERVER_SOFTWARE'))) ? 'Refresh: 8; URL=' : 'Location: ';
      $redirect = "index.php";
      header($header_location . $redirect);
      pageheader($lang_info, "<META http-equiv=\"refresh\" content=\"15;url=$redirect\">");
      msg_box($lang_photoshop_ipn['success'], $lang_photoshop_ipn['thank_you'], $lang_continue, $redirect);
      pagefooter();
      //foreach ($_POST as $key => $value) { echo "$key: $value<br>"; }

      break;

My website is hosted on Linux shared hosting.

Thanks


Billy

Gene-2008

 :o Of course it goes back to your home page you told it to....    ;D =>    $redirect = "index.php";

The part of code that marks the purchase as paid is under the:      case 'ipn':

Look in logs to find out what you received from Paypal...

Gene




BillyWardrop

Hi

Thanks for the quick reply. I've looked in the case 'ipn' but im not sure what to add there.

Do I put the header code there? Sorry This is my first coppermine project. Where can I access the PayPal logs?

Thanks




Gene-2008

So are you "playing" with photoshop because you want to sell pictures or are you wanting to learn php/html/coppermine/coppermine plugins.

If it is a desire to sell pictures you might want to ask someone to setup shopping on your site.

If you want the latter then I'd suggest you start digging into the code... find something that you want to
know and dig into the code till you find it.  For example search for the word "log" in the files.  When you find it
look at the code around it and it will lead you to other code until you find your answer.

Gene


BillyWardrop

Hi Gene-2008

I give up! Ive tried to set it up using IPN but have had no joy. I need someone to set it up for me. Where woudl be the best place to look for some help? Paid of course.

Cheers

:-)