News:

Looking for documentation? Take a look on our wiki

Main Menu

SOFORT does not fire the plgVmOnUpdateOrderPayment - why?

Started by gba, April 05, 2018, 13:32:37 PM

Previous topic - Next topic

gba

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

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

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

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

gba

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

Milbo

It should be always false fired from a plugin. True fired by the core.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gba

The Paypal plugin fires true.
See /plugins/vmpayment/paypal/paypal.php:784

Also the standard plugin:
/plugins/vmpayment/standard/standard.php:158

jjk

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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

gba

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

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/