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

gba

  • Jr. Member
  • **
  • Posts: 277
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: 277
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: 277
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: 277
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

gba

  • Jr. Member
  • **
  • Posts: 277
Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
« Reply #4 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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9789
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
« Reply #5 on: March 14, 2019, 18:12:53 pm »
It should be always false fired from a plugin. True fired by the core.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gba

  • Jr. Member
  • **
  • Posts: 277
Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
« Reply #6 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

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3419
  • using Matomo instead of Google Analytics
Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
« Reply #7 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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

gba

  • Jr. Member
  • **
  • Posts: 277
Re: SOFORT does not fire the plgVmOnUpdateOrderPayment - why?
« Reply #8 on: March 18, 2019, 16:11:43 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