Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi there,

I'm not sure if I'm being a total muppet or not, but I can't find anyone else with this problem and I've tried everything I can think of, but the paypal_processor just doesn't seem to run on the return from Paypal. I've set up debug=1 on the pp_proc but it doesn't even log anything and I've added logging either side of it and they log to root or secure folders just fine.

Could you please take a look?

It's at the top of my template:

Code: Select all
      <cms:template title='Bowls To Buy' clonable="1">
<cms:paypal_processor debug='1' logfile='paypal.log'>
         
         <cms:set test_str2="this is also a test" />
         <cms:log test_str2 />
      
         <cms:if k_paypal_success>
            <cms:send_mail from=pp_receiver_email to=pp_payer_email subject='Thank you for your purchase!' >
                  Dear <cms:show pp_first_name /> <cms:show pp_last_name />,
           
                  Thank you for buying <cms:show pp_item_name />.

                  You item will be dispatched shortly.
       
            </cms:send_mail>
            <cms:set msg="SUCCESS: <cms:show k_paypal_success/>" />
         </cms:if>
   
         <cms:if k_paypal_error>
            <cms:set msg="ERROR: <cms:show k_paypal_error/>" />
            <cms:log msg />
         </cms:if>
      </cms:paypal_processor>
etc..


I can get to PP sandbox OK and after paying, I get the link back to my site (it's running on localhost, but I've set up a host file entry for my dev.domain.com). It returns me to the product page via a POST, which has all the necessary variables to complete the IPN (copied raw http data below, with few chars changed FSR):

mc_gross=89.99&protection_eligibility=Ineligible
&payer_id=8A34T9VPWKL&tax=0.00
&payment_date=09%3A50%3A03+Jan+07%2C+2014+PST
&payment_status=Completed&charset=windows-1252
&first_name=Toby&mc_fee=3.26&notify_version=3.7
&custom=&payer_status=verified&business=paypal%40scramjet.co.uk
&quantity=1&payer_email=[myemail]
&verify_sign=AFcWxV21C70v3bYYYRCpSSRl31AUibCP4P055ujBb204
&txn_id=3A042655CT093102T&payment_type=instant
&last_name=Worth&receiver_email=paypal_sb%40scramjet.co.uk&payment_fee=
&receiver_id=ZJJ9BZ4BFMB4&txn_type=web_accept
&item_name=CHE5&mc_currency=GBP
&item_number=18&residence_country=GB
&test_ipn=1&handling_amount=0.00
&transaction_subject=&payment_gross=
&shipping=0.00
&auth=AhsWTGkZGmZultQOMbDtBwJuMPcIMxo0Zs7SSvL6.dsXqKYXZon1a2

But on arrival back at the product page, there's no logging, no variables available on page (I'm using cms:dump_all at the footer) and any cms:show pp_[something] tags are empty. It simply isn't hitting that pp_processor.

Any thoughts? I'm totally stuck. Thanks in advance.

Toby.
Hi Toby,

I think you answered yourself -
the problem is that your installation is on a localhost.
Setting up a host entry will work for you but for everybody else on the Internet your installation remains unreachable - and that includes PayPal when it sends back the IPN (remember IPNs are sent asynchronously i.e. are independent of your interaction with PayPal site).

I am sure once you move your site to a publicly accessible server, you'll receive the IPNs as expected.

Hope this helps.
Dargh! I suspected as much, but I didn't realise that the IPN was received asynchronously (I thought it was a POST back to the product page).

Obviously there don't seem to be many other people with this problem (judging by the lack of matches on my searches), but perhaps a small diagram of the process would clarify it for beginners?

Just to clarify my misunderstanding: I thought PP created and submitted a form with an action property of the notify_url page that was supplied to PP in the original product page's paypal-button form. My understanding was that this would be a normal (synchronous) request created on PP site and submitted by javascript when you click the 'back to seller site' link.

If you wouldn't mind, I'd appreciate a clearer idea of what actually does happen.

Thanks for the help though dude, very prompt as always :)

T.
Hardly surprising, Toby - IPN can be a difficult concept to wrap one's head around :)

I think the following article does a good job of trying to make sense of it -
http://www.micahcarrick.com/paypal-ipn-with-php.html

You should find the first few paragraphs (particularly the diagram) of the page useful - rest is coding stuff that is already taken care of by Couch.

Hope this helps.
4 posts Page 1 of 1
cron