VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: thefbi on August 11, 2022, 11:54:05 AM

Title: Order status pending with Paypal confirmed payement
Post by: thefbi on August 11, 2022, 11:54:05 AM
Hello,
I have a problem with the Paypal payement in a site. When a payement is done, the order status still in pending in admin.
The configuration in Paypal plugin is good.

And even is the status is pending, i dont receive any email (no one in client email and no one in admin email).
I receive email when payement by bank transfert, so in pending too.

I have never had this problem before on this site, and we have noticed this issue recently.
How can I verify that everything is OK on the configuration side?

Joomla 3.10.10
VM 4.0.6 10690
PHP 7.4.13

I tried in Paypal sandbox and have the same problem.
Here is the sandbox log :


2022-08-11 11:19:51 DEBUG plgVmConfirmedOrder: order number: Q6L20135
2022-08-11 11:19:51 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 712.45 paymentcurrency 27 orderusercurrency27
2022-08-11 11:19:51 DEBUG PayPal request:: Array
(
    [cmd] => _ext-enter
    [redirect_cmd] => _xclick
    [paymentaction] => sale
    [upload] => 1
    [business] => sb-dqlgl7479222@business.example.com
    [receiver_email] => sb-dqlgl7479222@business.example.com
    [order_number] => Q6L20135
    [invoice] => Q6L20135
    [custom] => a9dqnr9f53ebkbki8pe4mmg4h4
    [currency_code] => CHF
    [address_override] => 0
    [first_name] => Frédéric
    [last_name] => Bianchi
    [address1] => Ch. du salève 9
    [address2] =>
    [zip] => 1004
    [city] => Lausanne
    [state] =>
    [country] => CH
    [email] => fredericbianchi@icloud.com
    [night_phone_b] =>
    [return] => https://lampedesign.ch/index.php?option=com_virtuemart&view=vmplg&task=pluginresponsereceived&on=Q6L20135&pm=8&Itemid=121&lang=fr-FR
    [notify_url] => https://lampedesign.ch/index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang=fr-FR
    [cancel_return] => https://lampedesign.ch/index.php?option=com_virtuemart&view=vmplg&task=pluginUserPaymentCancel&on=Q6L20135&pm=8&Itemid=121&lang=fr-FR
    [rm] => 2
    [bn] => VirtueMart_Cart_PPA
    [no_shipping] => 0
    [no_note] => 1
    [image_url] => https://lampedesign.ch/images/stories/virtuemart/vendor/lampedesign_logo_300px.png
    [item_name] => Numro de la Commande: Q6L20135
    [amount] => 712.45
)

2022-08-11 11:20:12 DEBUG plgVmOnPaymentResponseReceived: stdClass Object
(
    [id] => 124
    [virtuemart_order_id] => 166
    [order_number] => Q6L20135
    [virtuemart_paymentmethod_id] => 8
    [payment_name] => <span class="vmpayment_name">PayPal SANDBOX</span> <span style="color:red;font-weight:bold">Sandbox (8)</span>
    [payment_order_total] => 712.45000
    [payment_currency] => 27
    [email_currency] => 27
    [cost_per_transaction] => 0.00
    [cost_percent_total] => 3.40
    [tax_id] => -1
    [paypal_custom] => a9dqnr9f53ebkbki8pe4mmg4h4
    [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] => 2022-08-11 11:19:51
    [created_by] => 748
    [modified_on] =>
    [modified_by] => 0
    [locked_on] =>
    [locked_by] => 0
)


I checked the IPN notification message log on the Paypal acount, and i can see the ipn from yesterday. All seem correct on it. That was a real Paypal transaction, but order still in pending.
I dont see any ipn from my sandbox test, but i thing it is normal.

Title: Re: Order status pending with Paypal confirmed payement
Post by: ssc3 on August 12, 2022, 08:58:36 AM
You are running VM 4.0.6 which is currently causing issues in Joomla 3 as well as Joomla 4

Might be worthwhile rolling back to an earlier version.

From other posts in the forum VM 4.0.2 seems to cause the least amount of problems.

Also in the PayPal account there is an option to resend the IPN.

I don't think IPN's are the most reliable way of updating status.
Title: Re: Order status pending with Paypal confirmed payement
Post by: GJC Web Design on August 12, 2022, 12:05:31 PM
from memory in PP sandbox you have to manually send an IPN for testing..
But i always find a 1p product live to be the best test
Title: Re: Order status pending with Paypal confirmed payement
Post by: thefbi on August 12, 2022, 13:43:08 PM
Quote from: GJC Web Design on August 12, 2022, 12:05:31 PM
from memory in PP sandbox you have to manually send an IPN for testing..
But i always find a 1p product live to be the best test
Thank you, i will try with a real payement.


Quote from: ssc3 on August 12, 2022, 08:58:36 AM
You are running VM 4.0.6 which is currently causing issues in Joomla 3 as well as Joomla 4
Hi, thank you.
I would like to understand once and for all how to know if we can update VM when a new update is released. Because if it's a "Stable" version, it shouldn't cause any bugs. It's not the first time that I update to a version and then I learn that it has bugs. So is there a place to find out? Or do you have to wait 6 months before updating every update?

EDIT : I see now, by going on the VM website and trying to download the latest version that it is 4.0.4... OK, so 4.0.6 is not stable? So why does it appear in the admin of my Joomla sites in the updates?
It shouldn't be there if it's not stable, or with a warning, right?

Quote from: ssc3 on August 12, 2022, 08:58:36 AM
Might be worthwhile rolling back to an earlier version.
I don't think IPN's are the most reliable way of updating status.
OK, i dont know how doing that, but will search.

Quote from: ssc3 on August 12, 2022, 08:58:36 AM
I don't think IPN's are the most reliable way of updating status.
OK, but how to do otherwise with Paypal?
Title: Re: Order status pending with Paypal confirmed payement
Post by: GJC Web Design on August 12, 2022, 14:50:39 PM
QuoteI would like to understand once and for all how to know if we can update VM when a new update is released.

The development team for VM is very small...  Max (Milbo) heads this team and he is gatekeeper for final versions and releases.
The basic problem with new versions is the testing .. again the testing team is relatively small and it is a huge undertaking to try and get each version tested .. there are so many different possibilities with config, templates and extensions now doubled by having 2 completely different versions of Joomla..

VM4 is really intended as a compatible version for Joomla 4 .. personally I would stay with VM3.8.8 for production sites on Joomla 3.
There has been a lot of pressure to get a J4 compatible version released and perhaps it was released a bit early but also I would never update a production site without first testing on a clone and scanning the forum to see what the reaction is to the release.
I would also check why a version is being released .. is it a security fix, bug fix, new functions etc ..  if only new functions am I interested in them?  If not why bother rushing to update...

the discovering of major routing problems with 4.0.4 & 4.0.6 came after their releases and there is the suspicion that the Joomla 4 routing is being changed between versions so effectively the VM4 dev is chasing a moving target... 

AFAIK most of the routing problems have been solved in the latest 4.0.7 version that will be released as 4.0.8.. 
Max is currently on holiday so it may be a few days yet..
Title: Re: Order status pending with Paypal confirmed payement
Post by: thefbi on August 12, 2022, 16:31:50 PM
OK, thanks for that explanation. I understand better now. I will be much more careful for future VM updates. In this case, I think I'll wait for the next release to see if the problem is fixed.
Title: Re: Order status pending with Paypal confirmed payement
Post by: ssc3 on August 12, 2022, 17:02:57 PM
Quote from: thefbi on August 12, 2022, 13:43:08 PM
i will try with a real payement.

Sandbox IPN's should be sent automatically, though they might not have the same priority as the live IPN's.
If you do not see any IPN's, check the PayPal Status site for any problems with the servers. Both production and sandbox
https://www.paypal-status.com/history/production

Quote
Quote from: ssc3 on August 12, 2022, 08:58:36 AM
I don't think IPN's are the most reliable way of updating status.
OK, but how to do otherwise with Paypal?

Other options are available, but from my own site if you want to avoid using IPN's

PayPal Express SSC
https://plugins.online-store.co.uk/paypal_express_checkout.html
Version 1.4.46 has an update for VM 4.0.6
This gets the order status directly from the PayPal server at the end of the order process. No IPN's are needed.
Works best with shortcuts turned off. To the customer that makes the ordering process look just like PayPal Standard.

and

PayPal Checkout SSC
https://plugins.online-store.co.uk/virtuemart-paypal-checkout.html
also takes order status directly from the server but can use webhooks as a backup.
Webhooks are PayPal's replacement for IPN's.
Title: Re: Order status pending with Paypal confirmed payement
Post by: thefbi on August 12, 2022, 18:57:51 PM
OK thank you, i will probably try one of your plugin.

But my goal is to migrate all the site + VM on Joomla 4. So i dont know if actually, i can do that or it is better to wait.
Because the site is ready for J4.