Author Topic: What does this error mean please? Invalid PayPal IPN Transaction on your site  (Read 8095 times)

radicalfightershop

  • Beginner
  • *
  • Posts: 25
I recieved this email shortly after an order on my site. Im a little confused why is titled paypal.sandbox as its not enabled in VM.

Can anyone shed some light on what this means? The transaction is confirmed in paypal though. I have checked all of the API info and its all correct.


Subject: Invalid PayPal IPN Transaction on your site

Hello,

An Invalid PayPal Transaction requires your attention.
-----------------------------------------------------------
REMOTE IP ADDRESS: ##.###.###.##
REMOTE HOST NAME:
Order ID: 4
User ID: 70
Response from www.sandbox.paypal.com: HTTP/1.1 200 OK
Date: Fri, 17 Sep 2010 17:14:39 GMT
Server: Apache/1.3.33 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a mod_ssl/2.8.22 OpenSSL/0.9.7e
Set-Cookie: c9MWDuvPtT9GIMyPc3jwol1VSlO=kSXoTXb7FD7S7Gr1F7ODYip3UIvAJAFOb3c5nMR6e1y3A-b42n-PgI9kg-mNzqqFAS9xw-0K0rqZX0MIygS2i3_wtjzbeW50acfnJkkof0eM17-TU9bgk5GTf7aUgYelAeQ3IG%7c0zV-dqb1iBW7zdX4dqcNU-IBUUhPW8sTLxl8kOBouQJxxWavaxnXvrxwhsANPbml-_cDe0%7crbQo7T_o0ORoxQP8K4-1oO1O5n5Pnxf1D9nelf4aslvrmuQ1Sp42WYvo2SSVfbQ_fhRlX0%7c1284743680; domain=.paypal.com; path=/
Set-Cookie: cookie_check=yes; expires=Mon, 14-Sep-2020 17:14:40 GMT; domain=.paypal.com; path=/
Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/
Set-Cookie: navlns=0.0; expires=Thu, 12-Sep-2030 17:14:40 GMT; domain=.paypal.com; path=/
Set-Cookie: Apache=10.191.196.11.321921284743679433; path=/; expires=Thu, 04-Aug-04 10:46:23 GMT
Connection: close
Content-Type: text/html; charset=UTF-8

INVALID

radicalfightershop

  • Beginner
  • *
  • Posts: 25
Just had a reply from paypal on this :-
---------------------------------------------------
Hello,

When an IPN returns a verification response of "INVALID" that does not mean the transaction was declined through PayPal. It usually means you didn't post back all the IPN variables or you were sending it to the incorrect endpoint.
Here is a link to an IPN troubleshooting guide and it will help you determine why you're receiving an "INVALID" response and give you tips on how to prevent them:
https://www.x.com/docs/DOC-1551

-----------------------------------------------------------

What is seems is happening with the "paypal api new" payment module is that its retained some of the sandbox paypal URLs for some reason so still posting some information to sandbox even when the sandbox function is dissabled.

Anyone any ideas for a fix in the script?

bastler

  • Beginner
  • *
  • Posts: 2
hi,

got the same problem, also using paypal api new. obviously the payment on paypal is ok.

like in the example above, i have "Response from www.sandbox.paypal.com: HTTP/1.1 200 OK".

and as radicalfightershop says: sandbox is disabled

does anyone has an idea what's wrong?

Nyggen81

  • Beginner
  • *
  • Posts: 9
Same problem for me on new api.
All of the transaction is ok, but still got this message...

Anyone?

Nyggen

sandstorm

  • Jr. Member
  • **
  • Posts: 226
  • Skype Name: sandstorm871
  • VirtueMart Version: 3.0.12
Im getting  the same here to.

I have all other payment methods disabled, sandbox off, all correct API usernames, signatures, etc.

The checkout process seems to work fine, payments are taken, but a few minutes late I get an eMail as in the above posts
 
Invalid PayPal IPN Transaction on your site

Has anyone resolved this problem or have any advice on how to remedy it?

Thanks,
J3.4.8 / PHP5.5.31
VM3.0.12

sandstorm

  • Jr. Member
  • **
  • Posts: 226
  • Skype Name: sandstorm871
  • VirtueMart Version: 3.0.12
Ive solved my own issue here, which was down to my own user error.

I had set everything up correctly but hadnt been into to the PayPal account and set the IPN URL backto the notify.php script in the website.

Code: [Select]
http://www.yoursite.com/administrator/components/com_virtuemart/notify.php
After entering this URL and enabling the IPN in paypal (struggled to find it but with a quick "IPN" search in the paypal account, stumbled upon it) I have stopped getting ther IPN error message and now get a IPN success email, saying that order has been confirmed.

HTH
J3.4.8 / PHP5.5.31
VM3.0.12

FrankA

  • Full Member
  • ***
  • Posts: 225
Thank Sandstorm, guessed it was that simple!

FrankA

  • Full Member
  • ***
  • Posts: 225
Or maybe not, made the change by setting IPN just rechecked path was correct, it is.

But the first sale following this has worked and is confirmed, the IPN history in the paypal account is good, but still after the confirmation e-mail for the order a second e-mail with this INVALID message?

FrankA

  • Full Member
  • ***
  • Posts: 225
Logic suggest that this is a bug in the PayPal API.

Paypal API history is showing that it sent confirmation.

Email sent from VM after processing the order and sending confirmed ordrer... it then generates an INVALID response. As this second does not show in the Paypal history then I presume the error is in the listener.

Are the actual IPN messages received from Paypal stored within VM directories/ or database on the site?

FrankA

  • Full Member
  • ***
  • Posts: 225
Getting one after every sale... on the plus side no problems with the sale, just this bug in the code and it is way beyond my limited php skills to work out why.

Dj Tremors

  • Beginner
  • *
  • Posts: 3
I had the same issue which sandbox was off but noticed when the paypal payment went through and we got messages about sandbox I knew it was using the wrong hostname when posting to paypal..

tracked the bug here and just quickly overwrote the $hostname to test and work around the problem, see if this helps.

./administrator/components/com_virtuemart/notify.php
Code: [Select]
        if( $paypal_sandbox_hostname == $remote_hostname ) {
            $valid_ip = true;
            $hostname = 'www.sandbox.paypal.com';
        }
        else {
            $ips = "";
            // Loop through all allowed IPs and test if the remote IP connected here
            // is a valid IP address
            if( in_array( $_SERVER['REMOTE_ADDR'], $paypal_iplist )) {
                    $valid_ip = true;
            }
            $hostname = 'www.paypal.com';
        }
            $hostname = 'www.paypal.com'; // <-------   force the non sandbox hostname . by EITadmin

        if( !$valid_ip ) {
            debug_msg( "Error code 506. Possible fraud. Error with REMOTE IP ADDRESS = ".$_SERVER['REMOTE_ADDR'].".
                        The remote address of the script posting to this notify script does not match a valid PayPal ip addre