VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: squalogu on January 20, 2022, 14:49:28 PM

Title: Error with paypal payment in your shop [solved]
Post by: squalogu on January 20, 2022, 14:49:28 PM
hi, the payment arrives, the order is accepted, everything ok. but I always get this email: Error with paypal payment in your VirtueMart 3 Sample store. The details are recorded in the paypal.5.log.php file
?

Good morning,

Error with paypal payment in your shop mysite... The details are recorded in the paypal.5.log.php file

VirtueMart team

? what is the problem?
Title: Re: Error with paypal payment in your shop
Post by: jenkinhill on January 20, 2022, 16:31:40 PM
Have you searched? Try looking in the FAQS.

??  http://forum.virtuemart.net/index.php?topic=147799.0
Title: Re: Error with paypal payment in your shop
Post by: squalogu on January 20, 2022, 16:45:05 PM
hi, yes but I don't found this topic.
thanks now I try
Title: Re: Error with paypal payment in your shop
Post by: squalogu on January 20, 2022, 16:51:25 PM
hi, My error text is different..
anyway I don't foud where I can do this.. Please sse attachment
Title: Re: Error with paypal payment in your shop
Post by: squalogu on January 20, 2022, 17:27:09 PM
Joomla! 3.10.3 
VirtueMart 3.0.17

I can't update.

In the paypal payment metod there are this information.

Can I disable from file or code? how?

thanks!
Title: Re: Error with paypal payment in your shop
Post by: jenkinhill on January 20, 2022, 17:58:07 PM
That VM is over 5yrs old!

What did the logged error actually say?  Log files are in  yoursite/administrator/index.php?option=com_virtuemart&view=log
Title: Re: Error with paypal payment in your shop
Post by: squalogu on January 20, 2022, 18:03:08 PM
I send you in attachement
Title: Re: Error with paypal payment in your shop
Post by: jenkinhill on January 20, 2022, 18:43:25 PM
Error is ERROR checkPaypalIps Error with REMOTE IP ADDRESS   - exactly as in http://forum.virtuemart.net/index.php?topic=147799.0

I have added an image to the FAQ.  I think you may need to update your plugin.......
Title: Re: Error with paypal payment in your shop
Post by: squalogu on January 20, 2022, 18:50:20 PM
I don't have this option:https://prnt.sc/26gfcdu      in my: https://prnt.sc/26gfcdu
Title: Re: Error with paypal payment in your shop
Post by: squalogu on January 20, 2022, 18:52:55 PM
to update virtuemart? I tried but then it is not compactable with the templates ..
Title: Re: Error with paypal payment in your shop
Post by: GJC Web Design on January 20, 2022, 22:47:30 PM
then u will have to remove the check manually from the file...

look for the function  protected function checkPaypalIps ($paypal_data) {     - in plugins\vmpayment\paypal\paypal\helpers\paypal.php

immediately after the function opening add

return true;



protected function checkPaypalIps ($paypal_data) {
return true;

.....   code continues



Title: Re: Error with paypal payment in your shop
Post by: squalogu on January 21, 2022, 10:10:56 AM
Hi, thaks

I have:    protected function checkPaypalIps ($paypal_data) {
      /*
            $test_ipn = (array_key_exists('test_ipn', $paypal_data)) ? $paypal_data['test_ipn'] : 0;
            if ($test_ipn == 1) {
               return true;
            }
      */


I need to edti like this:
protected function checkPaypalIps ($paypal_data) {
      /*
               return true;
            }
      */


?



I have 2 time the file paypal.php :
here:
/plugins/vmpayment/paypal/paypal.php

and here:
/plugins/vmpayment/paypal/paypal/helpers/paypal.php


I need to edit both files?

thanks!

I attach the file
Title: Re: Error with paypal payment in your shop
Post by: Jörgen on January 21, 2022, 10:59:34 AM
Hello

Your code snippets clearly show that You do not know how PHP works. Changing code without basic knowledge can lead to more trouble than you already have.
The bit of code you are showing us has been commented out and is not active. The rest if the function is active, but Your code change would also be inactivated.

You can do it like this:
protected function checkPaypalIps ($paypal_data) {
   return true;    // JH  2022-01-21  Return and allow any IP adress
     
/*
            $test_ipn = (array_key_exists('test_ipn', $paypal_data)) ? $paypal_data['test_ipn'] : 0;
            if ($test_ipn == 1) {
               return true;
            }
      */


I hope it helps

Jörgen @ Kreativ Fotografi




Title: Re: Error with paypal payment in your shop
Post by: GJC Web Design on January 21, 2022, 11:01:40 AM
or see attached
Title: Re: Error with paypal payment in your shop
Post by: squalogu on January 21, 2022, 11:11:27 AM
hello, yes in fact I'm not very practical.

In the file:

/plugins/vmpayment/paypal/paypal/helpers/paypal.php

i did as attached.

right?
Title: Re: Error with paypal payment in your shop
Post by: Jörgen on January 21, 2022, 11:33:43 AM
Yes seems to be alright.

Will give the same result.

Jörgen @ Kreativ Fotografi
Title: Re: Error with paypal payment in your shop [solved]
Post by: squalogu on January 21, 2022, 11:37:55 AM
thanks""" I think it is solved""  8)