Author Topic: Confirmed orders changing to cancelled automatically ??  (Read 4426 times)

xpozay

  • Beginner
  • *
  • Posts: 48
Confirmed orders changing to cancelled automatically ??
« 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




nikhilthecool

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Confirmed orders changing to cancelled automatically ??
« Reply #1 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.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10422
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Confirmed orders changing to cancelled automatically ??
« Reply #2 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
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

nikhilthecool

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Confirmed orders changing to cancelled automatically ??
« Reply #3 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.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10422
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Confirmed orders changing to cancelled automatically ??
« Reply #4 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
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

nikhilthecool

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Confirmed orders changing to cancelled automatically ??
« Reply #5 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.



Please help me.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10422
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Confirmed orders changing to cancelled automatically ??
« Reply #6 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?
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

nikhilthecool

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Confirmed orders changing to cancelled automatically ??
« Reply #7 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.


nikhilthecool

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Confirmed orders changing to cancelled automatically ??
« Reply #8 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.


Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10213
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Confirmed orders changing to cancelled automatically ??
« Reply #9 on: July 09, 2015, 10:26:41 am »
Sounds like an unsecure payment plugin.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/