forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: BillyWardrop on March 02, 2010, 04:41:35 pm

Title: PayPal IPN no redirect
Post by: BillyWardrop on March 02, 2010, 04:41:35 pm
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
Title: Re: PayPal IPN no redirect
Post by: Gene-2008 on March 02, 2010, 05:53:35 pm
 :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



Title: Re: PayPal IPN no redirect
Post by: BillyWardrop on March 03, 2010, 12:13:42 pm
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



Title: Re: PayPal IPN no redirect
Post by: Gene-2008 on March 03, 2010, 02:21:22 pm
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

Title: Re: PayPal IPN no redirect
Post by: BillyWardrop on March 19, 2010, 03:34:10 pm
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

:-)