Author Topic: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?  (Read 149 times)

gba

  • Jr. Member
  • **
  • Posts: 247
SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
« on: April 05, 2018, 13:32:37 pm »
Hi all!

I am using VM 3.2.12 in Joomla!3.8.6.
And I am having big troubles with the SOFORT payment plugin.
In the plugin backend I have chosen status 'Confirmed' (C) on finished transactions.
But the plugin does not run the plgVmOnUpdateOrderPayment in the payment plugins, although the status C is set with the order.
When I again set the order status manually to C in the order backend, everything is OK.

What is the difference between setting the order status manually and having it set by the SOFORT plugin?

Thank you very much in advance for your help!

Kind regards,
Gerald

gba

  • Jr. Member
  • **
  • Posts: 247
Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
« Reply #1 on: April 05, 2018, 14:22:41 pm »
Hi again!

I just found out following:
On cancelled SOFORT transactions the functions plgVmOnUpdateOrderPayment, plgVmOnCancelPayment and plgVmOnUserPaymentCancel are executed.
Alright.
But on finished SOFORT transaction only the functions plgVmOnPaymentNotification and plgVmOnPaymentResponseReceived are executed.
But why function plgVmOnUpdateOrderPayment is not fired on finished transactions?!

Kind regards,
Gerald

gba

  • Jr. Member
  • **
  • Posts: 247
Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
« Reply #2 on: April 05, 2018, 15:43:59 pm »
Hi!

Another insight:
In \administrator\components\com_virtuemart\plugins\vmpsplugin.php the function processConfirmedOrderPaymentResponse() is not called in sofort.php, while it is called i. e. in paypal.php on success.
???

Kind regards,
Gerald

gba

  • Jr. Member
  • **
  • Posts: 247
Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
« Reply #3 on: April 05, 2018, 17:27:23 pm »
Hello!

Now I found the "bug":
In sofort.php:455 there is following line
Code: [Select]
$modelOrder->updateStatusForOneOrder($payments[0]->virtuemart_order_id, $order_history, false);The last parameter 'useTriggers' is set to false - this is the reason, why the other payment plugins are not triggered in function plgVmOnPaymentNotification.
When I change this parameter to true, everything seems to work fine.
Does anyone have any idea, why SOFORT is not wanting to "inform" the others?
Maybe even Valérie Isaksen herself?

Kind regards,
Gerald