VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: xpozay on July 13, 2013, 14:32:31 PM

Title: Confirmed orders changing to cancelled automatically ??
Post by: xpozay on July 13, 2013, 14:32:31 PM
I have not seen this anywhere in the forum thus assume it is a unique problem and thus am really seeking guidance on where to begin narrowing down the problem.

I have simple configuration:
- simple products, no child variants,
- single language (English),
- ship to one country only.
- 1 pricing option (paypal express not pro)
- VM 2.0.18a and J2.5.9

The only non standard thing I do, is to use Rupostel's one page checkout.

I have around 20 - 30 orders per day with anywhere from 1 to 10 products per order.  100% of orders are paid via paypal.

The problem
- Occasionally (5 or 6 times in the past 3 months), after the order has been paid, via Paypal and the order status changed to completed, the order status is subsequently changed to cancelled. 
- The order history (I looked through mysql) shows that the order was changed by the shopper (I assume this because it shows the shopper's userid making the change) in each case.
- The order history shows the the change from completed to cancelled happens around 3 to 5 minutes after the order was changed to completed.
- Paypal maintains the order as paid.  Emails are sent to the customer from both VM and Paypal.

I have played around and cannot even find a place in the front end where the customer could cancel an order let alone cancel one without affecting paypal or notifying the shop. 

Questions
- Is there a way for customer's to cancel an order that has been paid via paypal?
- This appears to be a bug but I do not know even where to start isolating the problem.

How can I start to debug this problem?

Thanks



Title: Re: Confirmed orders changing to cancelled automatically ??
Post by: nikhilthecool on June 29, 2015, 11:49:33 AM
Hi,

Were you able to rectify the bug? I am also facing this issue with similar configuration.
VM 2.6.18
Joomla 2.5.28

After payment is successful, all the orders are confirmed first and immediately converted to cancelled.

Please help.
Title: Re: Confirmed orders changing to cancelled automatically ??
Post by: GJC Web Design on June 29, 2015, 12:11:33 PM
it is the payment plugin (or at least the call back from the payment gateway) that sets this .. so at least mention your payment method
Title: Re: Confirmed orders changing to cancelled automatically ??
Post by: nikhilthecool on June 29, 2015, 13:29:41 PM
Hi,

Thanks for revert.

I am using PayuMoney payment gateway. https://www.payumoney.com/

What is surprising is after a success response from the payment gateway, the customer clearly sees the "Thank you Page" confirming the order. However, the very next minute the order status changes to "Cancelled".

Here is the plugin code attached.
Title: Re: Confirmed orders changing to cancelled automatically ??
Post by: GJC Web Design on June 29, 2015, 17:49:09 PM
the status and return to the acknowledge page is handled by the function plgVmOnPaymentResponseReceived()  around line 209

as a start u would need to debug that..

Or check the server access logs and check there is not a double Post back from the gateway

some urls with  index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&on=...  in them
Title: Re: Confirmed orders changing to cancelled automatically ??
Post by: nikhilthecool on June 29, 2015, 21:28:36 PM
Hello,

I completed one live transaction on the payment gateway and captured the raw server logs for my IP address. I am attaching the entire log for this IP.

As I could figure out, the URL index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&on=... is accessed only once. The transaction got confirmed but changed to cancelled automatically, immediately after.

I don't know how to debug a function.. But I tried to turn ON the debug mode in VM and Joomla and got the following messages after confirmation of payment, i.e., on Thankyou Page. I guess everything looks fine on this page.

(http://s23.postimg.org/a6ufxcgc7/Debug.jpg) (http://postimg.org/image/a6ufxcgc7/)

Please help me.
Title: Re: Confirmed orders changing to cancelled automatically ??
Post by: GJC Web Design on June 29, 2015, 21:36:50 PM
yes - nothing related in the debug

to debug the function u need to construct a call to trigger the function and check each stage by echoing out what is happening

is the plugin commercial? what does the developer say?
Title: Re: Confirmed orders changing to cancelled automatically ??
Post by: nikhilthecool on June 29, 2015, 21:54:14 PM
The plugin is freely downloadable from payumoney website. I have logged the issue with the payment gateway team. Expecting some support from them hopefully. Lets see how it progresses and I will post an update here once I get one.

Thanks for your help so far.

Title: Re: Confirmed orders changing to cancelled automatically ??
Post by: nikhilthecool on July 04, 2015, 23:59:05 PM
SOLVED !!

I checked with my payment gateway provider and they said that the Thank you page refreshes after it is loaded, which is why the order, after being confirmed, goes into cancellation. The provider also suggested to downgrade from VM 2.6.18 to VM 2.0.6, which is the compatible version.

However, later I realized that the issue occured because of a Google Adsense ad loading in one of the modules on the Thank you Page. This is what was causing the cancellation. I have unassigned the Google Adsense module from the Thank you Page and now orders are flowing smoothly.

Title: Re: Confirmed orders changing to cancelled automatically ??
Post by: Milbo on July 09, 2015, 10:26:41 AM
Sounds like an unsecure payment plugin.