Author Topic: Paypal IPN bug  (Read 3718 times)

gripped

  • Beginner
  • *
  • Posts: 40
    • ecigsoulet
Paypal IPN bug
« on: May 22, 2014, 10:19:41 am »
Since I updated my production site to 2.6.2 last night I noticed orders paid with paypal were not confirming.
Checking on Paypal the ipn's had been sent

From the error.log
Code: [Select]
[Thu May 22 01:26:26 2014] [error] [client 173.0.81.1] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /var/www/ecigsoutlet.co.uk/htdocs/plugins/vmpayment/paypal/paypal.php on line 639
[Thu May 22 01:26:33 2014] [error] [client 146.90.107.111] PHP Notice:  Undefined variable: paypal_data in /var/www/ecigsoutlet.co.uk/htdocs/plugins/vmpayment/paypal/paypal.php on line 590, referer: https://www.paypal.com/uk/cgi-bin/webscr?cmd=_flow&SESSION=foo&dispatch=bar
[Thu May 22 01:26:33 2014] [error] [client 146.90.107.111] PHP Notice:  Trying to get property of non-object in /var/www/ecigsoutlet.co.uk/htdocs/plugins/vmpayment/paypal/paypal/tmpl/stdresponse.php on line 42, referer: https://www.paypal.com/uk/cgi-bin/webscr?cmd=_flow&SESSION=foo&dispatch=bar
[Thu May 22 01:26:33 2014] [error] [client 146.90.107.111] PHP Notice:  Trying to get property of non-object in /var/www/ecigsoutlet.co.uk/htdocs/plugins/vmpayment/paypal/paypal/tmpl/stdresponse.php on line 42, referer: https://www.paypal.com/uk/cgi-bin/webscr?cmd=_flow&SESSION=foo&dispatch=bar

I'm guessing this changed line (639) plugins/vmpayment/paypal/paypal.php might be at fault ? Returning a null array ?
Code: [Select]
$paypal_data = vRequest::get('post');
Anyway I have reverted the whole plugins/vmpayment/paypal folder back to the 2.6.0a code and its's working again now.

Paypal Standard

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9665
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Paypal IPN bug
« Reply #1 on: May 22, 2014, 11:12:45 am »
hmm - in vm2.6.2 there is public static function getPost( )  in administrator\components\com_virtuemart\helpers\vrequest.php

is that in your install?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

gripped

  • Beginner
  • *
  • Posts: 40
    • ecigsoulet
Re: Paypal IPN bug
« Reply #2 on: May 22, 2014, 11:22:53 am »
It is

Code: [Select]
public static function getPost( ){
return  filter_var_array($_POST, FILTER_SANITIZE_STRING);
}

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9665
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Paypal IPN bug
« Reply #3 on: May 22, 2014, 12:32:10 pm »
hmm - very odd - alatak ?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Paypal IPN bug
« Reply #4 on: May 22, 2014, 13:06:00 pm »
There will be an update, today.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gripped

  • Beginner
  • *
  • Posts: 40
    • ecigsoulet
Re: Paypal IPN bug
« Reply #5 on: May 22, 2014, 14:58:23 pm »
Cheers

e-trader

  • Jr. Member
  • **
  • Posts: 69
Re: Paypal IPN bug
« Reply #6 on: May 22, 2014, 18:57:16 pm »
Will the update now work using the joomla update system? (the currently listed updates do not function)?

gripped

  • Beginner
  • *
  • Posts: 40
    • ecigsoulet
Re: Paypal IPN bug
« Reply #7 on: May 22, 2014, 19:37:07 pm »
Live update has been removed because the joomla update is more reliable.

e-trader

  • Jr. Member
  • **
  • Posts: 69
Re: Paypal IPN bug
« Reply #8 on: May 22, 2014, 20:17:38 pm »
Yes and ironically, the VM updates listed on the joomla update do not work.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Paypal IPN bug
« Reply #9 on: May 22, 2014, 20:29:11 pm »
Today with the vm2.6.4?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

patrik60

  • Guest
Re: Paypal IPN bug
« Reply #10 on: May 23, 2014, 16:37:07 pm »
Works fine with 2.6.4

Regards
Patrik

hegbi

  • Beginner
  • *
  • Posts: 22
Re: Paypal IPN bug
« Reply #11 on: May 25, 2014, 14:33:53 pm »
Hi, still having this problem, updated all J2.5.20 / V2.6.4
error log
[25-May-2014 07:09:05 America/Chicago] PHP Notice:  Undefined variable: paypal_data in /***/plugins/vmpayment/paypal/paypal.php on line 590
[25-May-2014 07:09:05 America/Chicago] PHP Notice:  Trying to get property of non-object in /***/plugins/vmpayment/paypal/paypal/tmpl/stdresponse.php on line 42
[25-May-2014 07:09:05 America/Chicago] PHP Notice:  Trying to get property of non-object in /***/plugins/vmpayment/paypal/paypal/tmpl/stdresponse.php on line 42
IPN from PayPal is OK status 200 but not receiving anything (missing total value and currency)
What else to try?

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: Paypal IPN bug
« Reply #12 on: May 26, 2014, 12:59:06 pm »
Hello
Thank you for reporting thoses notices: i have fixed the code for this case.
You get them because you did not received an IPN.

If you were receiving an IPN before, and you updated to 2.6.4 both the component and aio, i do not see any reason why it should not work.
Can you activate the log option in the paypal configuration to check if there is any message logged that can help me to understand why you get this problem?

hegbi

  • Beginner
  • *
  • Posts: 22
Re: Paypal IPN bug
« Reply #13 on: May 27, 2014, 11:40:47 am »
Thank you for the answer.
First problem, the test site was under "Site Lock" (JShowroom). Reinstalled everything, pics changed from .png to .gif, unlocked the site, changed that both e-mail addresses are the same and now I am at least receiving e-mails, changed statuses and invoices! I think the main problem here was that I was too tired :)

Still shows those same PHP Notices in error.log and there is a total value & PayPal Transaction Id missing when redirected back to my site from PayPal. Everything else looks great in e-mails and on my web when you go back and check the order but when I check phpMyAdmin table *****_virtuemart_payment_plg_paypal, there are three lines for the same order (pending, confirmed by shoper, confirmed) but the last two are empty besides the order number in row "paypal_response_invoice".
Pls find logs attached.

Payment Name   PP PayPal account needed Sandbox (3)
Order Number   d602026
Total Amount   

Also, sometimes I receive e-mails like this:
An error with your payment paypal on your store *****.**. The details are logged in the file https://www.*****.**/administrator/index.php?option=com_virtuemart&view=log&task=edit&logfile=paypal.3.log.php

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: Paypal IPN bug
« Reply #14 on: May 27, 2014, 11:43:16 am »
Hello
I cannot download your file. Please send it via PM.