Advanced search  

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]

Pages: [1]   Go Down

Author Topic: PayPal IPN no redirect  (Read 5609 times)

0 Members and 1 Guest are viewing this topic.

BillyWardrop

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
PayPal IPN no redirect
« 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
Logged

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Re: PayPal IPN no redirect
« Reply #1 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



Logged

BillyWardrop

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: PayPal IPN no redirect
« Reply #2 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



Logged

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Re: PayPal IPN no redirect
« Reply #3 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

Logged

BillyWardrop

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: PayPal IPN no redirect
« Reply #4 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

:-)
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 21 queries.