VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: gba on April 05, 2018, 13:32:37 PM

Title: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: gba 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
Title: Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: gba 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
Title: Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: gba 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
Title: Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: gba on April 05, 2018, 17:27:23 PM
Hello!

Now I found the "bug":
In sofort.php:455 there is following line$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
Title: Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: gba on March 14, 2019, 17:12:40 PM
Hi!

In the meantime we have VM 3.4.2.
The code quoted is still the same.
So I'd like to repeat my question:
Does anyone have any idea, why SOFORT is not wanting to "inform" the others?

Kind regards,
Gerald
Title: Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: Milbo on March 14, 2019, 18:12:53 PM
It should be always false fired from a plugin. True fired by the core.
Title: Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: gba on March 14, 2019, 18:25:42 PM
The Paypal plugin fires true.
See /plugins/vmpayment/paypal/paypal.php:784

Also the standard plugin:
/plugins/vmpayment/standard/standard.php:158
Title: Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: jjk on March 16, 2019, 12:19:35 PM
I can't help because I never tried to configure SOFORT. Did you enable the 'Debug' and 'Log' options in the SOFORT configuration? The logs might provide additional hints about errors.
Title: Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: gba on March 18, 2019, 16:11:43 PM
Quote from: jjk on March 16, 2019, 12:19:35 PM
I can't help because I never tried to configure SOFORT. Did you enable the 'Debug' and 'Log' options in the SOFORT configuration? The logs might provide additional hints about errors.

Hello!

Thank you for taking time for this issue and your thoughts.
Actually this is not an issue connected with an error, but is is a matter of design.
The different bahaviour (not triggering other payment plugins) of the SOFORT payment plugin is due to a certain parameter being given FALSE instead of TRUE, like the other plugins do (please see previous posts in this thread).
So I am trying to find out the reason for the different behaviour of SOFORT in VM.

Thank you all in advance for any useful hint!

Kind regards,
Gerald
Title: Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: Milbo on October 23, 2019, 12:22:59 PM
I changed it to true
Title: Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
Post by: gba on December 05, 2019, 15:47:09 PM
Thank you!