VirtueMart Forum

VirtueMart 2 + 3 => Plugins: Payment, Shipment and others => Topic started by: maxread on October 26, 2021, 16:09:11 pm

Title: Paypal Payments not getting "Confirmed"
Post by: maxread on October 26, 2021, 16:09:11 pm
I have latest VM 3.8.8 and Joomla, php version etc. and VM had been working OK for quite a while.
All of a sudden, my orders are not getting "Confirmed", despite Paypal sending IPNs OK and the log showing the following for a succesful transaction:

Code: [Select]
2021-10-26 13:53:37 DEBUG plgVmConfirmedOrder: order number: 72SD03118
2021-10-26 13:53:37 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 16.1 paymentcurrency 52 orderusercurrency52
2021-10-26 13:53:58 DEBUG plgVmOnPaymentResponseReceived: stdClass Object
(
    [id] => 5226
    [virtuemart_order_id] => 3211
    [order_number] => 72SD03118
    [virtuemart_paymentmethod_id] => 2
    [payment_name] => <span class="vmpayment_name">Debit or Credit Card or Paypal</span>
    [payment_order_total] => 16.10000
    [payment_currency] => 52
    [email_currency] => 52
    [cost_per_transaction] => 0.00
    [cost_percent_total] => 0.00
    [tax_id] => 0
    [paypal_custom] => 97aee17d43d9194395ae959fcaab68f7
    [paypal_method] => 0
    [paypal_response_mc_gross] => 0.00
    [paypal_response_mc_currency] => 0
    [paypal_response_invoice] => 0
    [paypal_response_protection_eligibility] => 0
    [paypal_response_payer_id] => 0
    [paypal_response_tax] => 0.00
    [paypal_response_payment_date] => 0
    [paypal_response_payment_status] => 0
    [paypal_response_pending_reason] => 0
    [paypal_response_mc_fee] => 0.00
    [paypal_response_payer_email] => 0
    [paypal_response_last_name] => 0
    [paypal_response_first_name] => 0
    [paypal_response_business] => 0
    [paypal_response_receiver_email] => 0
    [paypal_response_transaction_subject] => 0
    [paypal_response_residence_country] => 0
    [paypal_response_txn_id] => 0
    [paypal_response_txn_type] => 0
    [paypal_response_parent_txn_id] => 0
    [paypal_response_case_creation_date] => 0
    [paypal_response_case_id] => 0
    [paypal_response_case_type] => 0
    [paypal_response_reason_code] => 0
    [paypalresponse_raw] => 0
    [paypal_fullresponse] => 0
    [created_on] => 2021-10-26 13:53:37
    [created_by] => 8839
    [modified_on] => 2021-10-26 13:53:37
    [modified_by] => 8839
    [locked_on] => 0000-00-00 00:00:00
    [locked_by] => 0
)
 

Any advice would be appreciated...

Thanks.

Title: Re: Paypal Payments not getting "Confirmed"
Post by: maxread on October 27, 2021, 15:16:10 pm
The strange thing is that Paypal redirects back to the site with the message:

THANK YOU FOR YOUR ORDER!

Payment Name   Debit or Credit Card or Paypal
Order Number   WVJ303122

So it LOOKs like everything is working, but all orders are left in the "Pending" state.... strange!
Title: Re: Paypal Payments not getting "Confirmed"
Post by: maxread on October 27, 2021, 15:27:53 pm
Looking at a previous log file, I notice that an entire section is missing from the recent transactions that fail to confirm:

2021-10-17 20:56:16 DEBUG PaymentNotification, paypal_data:: Array
(
    [mc_gross] => 16.25
    [invoice] => 28PE03107
    [protection_eligibility] => Eligible
    [item_number1] => EWDVD04
    [payer_id] => UXEZQ2EWYDG36
    [payment_date] => 13:56:03 Oct 17, 2021 PDT
    [payment_status] => Completed
    [charset] => windows-1252
    [mc_handling] => 1.25
    [first_name] => Mark
    [mc_fee] => 0.77
    [notify_version] => 3.9
    [custom] => bf33ef2dedd109dcfc3fa6be179039b7
    [payer_status] => unverified
    [business] => info@xxxxxxxxxxxx.co.uk
    [num_cart_items] => 1
    [verify_sign] => Af8vkomzqfzh9KEWhMvNF-7L6GfKAB9d2nPtmYw1sfPtuejoxb4gD.9H
    [payer_email] => xxxxxxxxxx@gmail.com
    [txn_id] => XXXXXXXXXXXX
    [payment_type] => instant
    [last_name] => xxxxxxx
    [item_name1] => The Dust Show DVD
    [receiver_email] => xxxxxxxxxxxxxxxxxxx
    [payment_fee] =>
    [shipping_discount] => 0.00
    [quantity1] => 1
    [insurance_amount] => 0.00
    [receiver_id] => EKE29RZFXNY4G
    [txn_type] => cart
    [discount] => 0.00
    [mc_gross_1] => 15.00
    [mc_currency] => GBP
    [residence_country] => GB
    [shipping_method] => Default
    [transaction_subject] =>
    [payment_gross] =>
    [ipn_track_id] => f5379490a0f77
)


Anybody....?
Title: Re: Paypal Payments not getting "Confirmed"
Post by: GJC Web Design on October 27, 2021, 15:36:19 pm
have a look at what Paypal says it's sending ... 


https://www.paypal.com/us/cgi-bin/webscr?cmd=_display-ipns-history&nav=0.3.5
Title: Re: Paypal Payments not getting "Confirmed"
Post by: maxread on October 27, 2021, 18:36:47 pm
Thanks for the reply. Paypal says it sent this:

Code: [Select]
mc_gross=16.10&
invoice=Q7VB03126&
protection_eligibility=Eligible&
item_number1=EWCD35&
payer_id=T4MSP8LZU9NJS&
payment_date=07:35:24 Oct 27, 2021 PDT&
payment_status=Completed&
charset=windows-1252&
mc_handling=1.10&
first_name=Paul&
mc_fee=0.77&
notify_version=3.9&
custom=67a766d9a7a3c0d1099018c434bab0b7&
payer_status=unverified&
business=info@xxxxx&
num_cart_items=1&
verify_sign=AfcIUq1t8wHoMjEi-yFBMcUBAYTFAsq7M0QbPzNLh8H.OP7y5Z4pKbuZ&
payer_email=xxxxxxxx&
txn_id=6M573418DF5276607&
payment_type=instant&
last_name=xxxxx&
item_name1=U 2021&
receiver_email=xxxxxxxxxx&
payment_fee=&
shipping_discount=0.00&
quantity1=1&
insurance_amount=0.00&
receiver_id=EKE29RZFXNY4G&
txn_type=cart&
discount=0.00&mc_gross_1=15.00&
mc_currency=GBP&
residence_country=GB&
receipt_id=1960-9610-2653-9550&
shipping_method=Default&
transaction_subject=&
payment_gross=&
ipn_track_id=f231932b5d95a


The last entry in the log looks like this:

Code: [Select]
2021-10-27 14:33:54 DEBUG plgVmConfirmedOrder: order number: Q7VB03126
2021-10-27 14:33:54 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 16.1 paymentcurrency 52 orderusercurrency52
2021-10-27 14:35:30 DEBUG plgVmOnPaymentResponseReceived: stdClass Object
(
    [id] => 5234
    [virtuemart_order_id] => 3219
    [order_number] => Q7VB03126
    [virtuemart_paymentmethod_id] => 2
    [payment_name] => <span class="vmpayment_name">Debit or Credit Card or Paypal</span>
    [payment_order_total] => 16.10000
    [payment_currency] => 52
    [email_currency] => 52
    [cost_per_transaction] => 0.00
    [cost_percent_total] => 0.00
    [tax_id] => 0
    [paypal_custom] => 67a766d9a7a3c0d1099018c434bab0b7
    [paypal_method] => 0
    [paypal_response_mc_gross] => 0.00
    [paypal_response_mc_currency] => 0
    [paypal_response_invoice] => 0
    [paypal_response_protection_eligibility] => 0
    [paypal_response_payer_id] => 0
    [paypal_response_tax] => 0.00
    [paypal_response_payment_date] => 0
    [paypal_response_payment_status] => 0
    [paypal_response_pending_reason] => 0
    [paypal_response_mc_fee] => 0.00
    [paypal_response_payer_email] => 0
    [paypal_response_last_name] => 0
    [paypal_response_first_name] => 0
    [paypal_response_business] => 0
    [paypal_response_receiver_email] => 0
    [paypal_response_transaction_subject] => 0
    [paypal_response_residence_country] => 0
    [paypal_response_txn_id] => 0
    [paypal_response_txn_type] => 0
    [paypal_response_parent_txn_id] => 0
    [paypal_response_case_creation_date] => 0
    [paypal_response_case_id] => 0
    [paypal_response_case_type] => 0
    [paypal_response_reason_code] => 0
    [paypalresponse_raw] => 0
    [paypal_fullresponse] => 0
    [created_on] => 2021-10-27 14:33:54
    [created_by] => 2466
    [modified_on] => 2021-10-27 14:33:54
    [modified_by] => 2466
    [locked_on] => 0000-00-00 00:00:00
    [locked_by] => 0
)


I don't get it.



Title: Re: Paypal Payments not getting "Confirmed"
Post by: maxread on October 29, 2021, 19:45:46 pm
Problem solved. Siteguarding antivirus had updated and the new version started blocking Paypal IPNs and also Acymailing cron job. I added all the relevant IPs to Siteguarding's whitelist and all is now well. :D
Title: Re: Paypal Payments not getting "Confirmed"
Post by: AH on November 01, 2021, 10:12:54 am
Thank you for posting the update and resolution to the issue
Title: Re: Paypal Payments not getting "Confirmed"
Post by: antonitus on December 15, 2021, 21:07:53 pm
I'm having this issue too (before and after the latest update).

After reading several posts on this problem, we were told that the latest version of Virtuemart would fix this problem. However I installed the very latest version (VM3.8.8.10472) and still this error exists. So this issue has definitely not been fixed.
There are really no real solutions so can the devs please issue a fix or add the fix to a new VM version. Or tell us exactly what to do ourselves via our PayPal sites.
Thanks.
Title: Re: Paypal Payments not getting "Confirmed"
Post by: GJC Web Design on December 15, 2021, 21:50:37 pm
@antonitus  - with the zero information you supply what would you like to be advised?

I myself can't be bothered re-asking have you checked/researched/investigated all the same steps that are asked every time when users report this....
Title: Re: Paypal Payments not getting "Confirmed"
Post by: AH on December 16, 2021, 10:58:53 am
Quote
I'm having this issue too (before and after the latest update).

His issue was a server config - there was no problem with VM PayPal.

You need to post more information on your particular problem

Title: Re: Paypal Payments not getting "Confirmed"
Post by: antonitus on December 16, 2021, 14:03:14 pm
Sorry 'GJC Web Design' and 'AH', I actually thought the error issue was above and was already reported from various people.

I'm getting emails such as this every day:

"Hello,

An error with your payment method paypal on your store xxxx. The details are logged in the file paypal.1.log.php

. The VirtueMart Team"


and this is what I see in file 'paypal.1.log.php':

Code: [Select]
"#<?php die("Forbidden."); ?>

2021-12-08 19:40:53 ERROR checkPaypalIps: Error with REMOTE IP ADDRESS = 173.0.81.140.

                        The remote address of the script posting to this notify script does not match a valid PayPal IP address

            These are the valid IP Addresses: 64.4.248.8,173.0.81.33,173.0.81.65,173.0.81.1,The Order ID received was: UUS701103
2021-12-09 14:10:04 ERROR checkPaypalIps: Error with REMOTE IP ADDRESS = 173.0.81.140."

..... and it repeats...

I've seen various possible solutions, but no real solid solutions. I keep hearing that the fix is on the latest version of VM, but from 2019. I just wanted to point out that this issue has not really been fixed in any VM version if anyone else is still having some of these issues.

As a side note, my PayPal specifies that IPN is off, so am I forced to have this on for this to work fully? Some payment emails still go through as successful payments, but mostly they don't (as I mentioned above).

Thanks for your kind help.
 

Title: Re: Paypal Payments not getting "Confirmed"
Post by: AH on December 16, 2021, 14:31:43 pm
Atonitus

There is no "fix"  other than listing the Possible PayPal additional IP addresses manually in the configuration of the PayPal plugin.

The solution that will function is to turn off IP checking in VM's PayPal settings - show in the image from version 3.8.9  available from 3.6.0
Title: Re: Paypal Payments not getting "Confirmed"
Post by: GJC Web Design on December 16, 2021, 15:05:58 pm
Quote
turn off IP checking in VM's PayPal settings

agree with AH  .. this is the fix ... Paypal now uses an impossibly long list of source IPs so IMHO it is impractical to try and list them all..

All my sites have the check off for months now and not a single IPN failure.

The IPN setting in your paypal account is ignored as the plugin over rides this setting
Title: Re: Paypal Payments not getting "Confirmed"
Post by: antonitus on December 16, 2021, 17:08:33 pm
Thanks guys (AH & GJC Web Design). I really appreciate your kind help.

I had this option set to 'Yes'. I have now set it to 'No'. I hope this fixes this issue as I have to manually put the orders through and as it is Christmas, I am getting quite a few of these emails.

I hope the next VM version will somehow fix this issue. PayPal is a pain right now. I'm looking at other payment portals available, but for now, I'll keep on using PayPal.
Title: Re: Paypal Payments not getting "Confirmed"
Post by: GJC Web Design on December 16, 2021, 17:41:18 pm
there is no "fix" for this ... you can attempt to find every single ip that Paypal may use to send their IPN from and list them in the text box provided but u will see that it runs into 100s.
paypal have notified them but they are complete blocks of ip addresses so why bother?

ATM we have 4 locks on the door .. switch off the check and you still have 3 locks on the door - so where's the problem?
The source IPN IP check is "nice" to have but until someone comes up with a very complex exploit to successfully change a fake payment to PAID simply by firing a fake IPN at your server then I will be leaving the check off.

The best check is to see if the money is in your Paypal account...  ;)

Though with automated software downloads of course this would be too late... but there are plenty of other hoops for the criminals to jump through..
Title: Re: Paypal Payments not getting "Confirmed"
Post by: AH on December 17, 2021, 10:09:06 am
@GJC

Agreed - there will be no fix as far as I can see due to the PayPal ip ranges changing.

Agree totally - I have IP check switched off for years, on all my customer sites - up until now, no problem has occurred .
Title: Re: Paypal Payments not getting "Confirmed"
Post by: antonitus on December 17, 2021, 17:23:32 pm
Before making that IPN change to 'No', the strange thing is that some orders were going through as PAID and some were not.

Quote
The best check is to see if the money is in your Paypal account
This is a very good point!

Some of the forum information I read about this issue say that the 'next VM update' would fix this issue, but this was a forum I read dated 2019. This is why I mentioned this statement.

But, yes, I don't seem to be getting any of those emails so it looks like this is the "fix".

I assume in the 'next' VM update is to have this IPN set to 'No'. That would certainly be an "update fix", so to speak.

Once again, thanks for all you kind help guys. I much appreciate it.
Title: Re: Paypal Payments not getting "Confirmed"
Post by: GJC Web Design on December 17, 2021, 17:54:31 pm
Quote
Before making that IPN change to 'No', the strange thing is that some orders were going through as PAID and some were not.

there has been for years a small set of IPs that paypal used for IPNs .. these have always been listed ( and still are) in the plugin and used for approvals of the check.

Then ~ 18 months ago Paypal increased the number of possible IPs hugely which now makes the check unsustainable...

Have requested Max to make the next release with the default set to no