VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: ksfbjoern on January 12, 2015, 13:02:57 PM

Title: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: ksfbjoern on January 12, 2015, 13:02:57 PM
Hello,

i got a problem with the payment method sofort. The order-process works. The payment redirection works, the Thank You Page is shown,
but there is no confirmation mail sent, instead an email is sent to the administrator with the following content:

Hallo,

Ein Fehler mit Ihrer Zahlungsart sofort in Ihrem Shop xxxxxxxxxxxxx. Die Details sind in der Datei sofort.18.log.php aufgezeichnet. Das VirtueMart Team

Error log:

#
#<?php die("Forbidden."); ?>

2015-01-12 11:49:53 ERROR plgVmOnPaymentNotification: no transaction ID for order numberxxxxxxxxxxx


A transaction id shown in the backend (order informations).

Has anyone an idea to solve this?

VM 3.0.2 - J3.3

Thanks a lot!

Greetings
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: mmichele on June 15, 2015, 00:10:45 AM
Hi,
I got same problem. Have you fix it?

Thanks in advice.
Michele
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: ksfbjoern on June 15, 2015, 10:35:42 AM
Yes it works after one of the last updates of Virutemart and AIO (Now 3.0.9).
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: mhuebler on August 27, 2015, 12:32:04 PM
I use VM 3.0.9 but still have the Error
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: gba on October 12, 2015, 12:42:58 PM
Hi VM team!

I am using VM 3.0.10 and have the problem, too.
No fix for that?

Kind regards,
Gerald
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: mhuebler on October 12, 2015, 13:21:52 PM
the error is still see at the log file .. but the payment works without any problems
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: gba on October 12, 2015, 13:49:31 PM
Hi!

Thank you for your reply.
Indeed, while the user is redirected to the shop properly after payment, the order just gets the status 'Pending' and the website admin gets an e-mail about the error message.
By the way: The error log file mentioned in the e-mail even does not exist.
So I cannot confirm, that the payment procedure "works without any problems".

Kind regards,
Gerald
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: mhuebler on October 12, 2015, 14:39:45 PM
for me the order status is changed correct after redirect back to the shop (cancel and confirm)
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: alatak on October 19, 2015, 11:17:19 AM
Hello
QuoteIndeed, while the user is redirected to the shop properly after payment, the order just gets the status 'Pending' and the website admin gets an e-mail about the error message.

Can you check if the function file_get_contents is disabled ?
You can check that via joomla in yourwebsite.com/administrator/index.php?option=com_admin&view=sysinfo, tab PHP Information
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: gba on October 19, 2015, 13:36:19 PM
Hi!

Thank you for your reply!

No, the function 'file_get_contents' IS enabled.
I could not find it in the PHP information, though, but using ...<?php
if (function_exists('file_get_contents')) {
    echo 
"function enabled";
} else {
    echo 
"function disabled";
}
?>
... I found out, that the function is enabled.

Any other idea?
Does this payment method need SSL?

Kind regards,
Gerald
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: alatak on October 20, 2015, 11:47:15 AM
Hello

Which hoster do you have?
Because i read that 1&1 has this function disabled

Actually it is this parameter that you have to  check allow_url_fopen = On

If you set the option PHP Developer mode   to ON in the VM config, and there is a problem while using file_get_contents, there should be a warning.
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: gba on October 20, 2015, 14:25:24 PM
Hi!

My hoster confirmed, that function 'file_get_contents' is enabled.
Otherwise I could not get 'function enabled' in my little script above anyway.
'allow_url_fopen' is 'On'.
There is no warning concerning 'file_get_contents'.

The only warning I get is:
QuoteStrict Standards: Declaration of plgVmCustomParam::parseCustomParams() should be compatible with vmCustomPlugin::parseCustomParams(&$field, $xParams = 'customfiel...') in [root]/plugins/vmcustom/param/param.php on line 968

Here is the VM Debug list:
Quotevmdebug PHP 5.4
vmdebug Show All Errors
vmdebug $siteLang: de-DE self::$vmlangSef: self::$_jpConfig->lang de_de DefLang de_de
vmdebug vmTime: time to load config: 0.00936412811279297
vmdebug Start used Ram 2.75M
vmdebug Common jQuery is disabled
vmdebug Going to set pw fields unrequired
vmdebug Created new cart
vmdebug getVendorId normal shopper
vmdebug Created new Calculator Instance
vmdebug shipmentmethod Versand per Post = TRUE for variable weight = 0 Reason: no boundary conditions set
vmdebug shipmentmethod Versand per Post = TRUE for variable order amount = 15.3 Reason: no boundary conditions set
vmdebug shipmentmethod Versand per Post = TRUE for variable zip = 4101 Reason: no boundary conditions set
vmdebug shipmentmethod Versand per Post = TRUE for variable virtuemart_country_id = 14, Reason: Countries in rule or none set
vmdebug vmTime: Time consumed for shipment/payment plugins: 0.0120260715484619
vmdebug with openssl_random_pseudo_bytes Var1:
A
vmdebug SOFORT sendTransactionRequest
vmdebug SOFORT sendTransactionRequest ... SofortLib_Multipay ... sendRequest()
vmdebug PHP 5.4
vmdebug Show All Errors
vmdebug $siteLang: de-DE self::$vmlangSef: self::$_jpConfig->lang de_de DefLang de_de
vmdebug vmTime: time to load config: 0.012714147567749
vmdebug Start used Ram 2.75M
vmdebug Common jQuery is disabled
vmdebug getVendorId normal shopper
vmdebug Going to set pw fields unrequired
vmdebug Created new cart
vmdebug Created new Calculator Instance
vmdebug vmTime: vm view Finished task : 1.09915494918823
vmdebug End used Ram 10.25M
vmdebug Peak memory peak 10.25M
vmdebug Common jQuery is disabled
vmdebug Common jQuery is disabled
vmdebug vmTime: Time consumed for shipment/payment plugins: 8.392333984375E-5
vmdebug Common jQuery is disabled
vmdebug Common jQuery is disabled

Does the plugin need SSL?

Kind regards,
Gerald
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: lindapowers on October 21, 2015, 00:23:31 AM
It doesnt need SSL cause we are using it without and is working perfectly
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: alatak on October 21, 2015, 12:04:30 PM
Hello

QuoteDoes the plugin need SSL?
yes it does not need it

I have added a config parameter in the payment to enable logging of the sofort transaction.
It should give more information about why in your case the file_get_contents returns NULL.

Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: gba on October 23, 2015, 19:51:34 PM
Hi!

Thank you very much for your special version.
Unfortunatelly the payment process still does not work.
This time even no log was written at all...

Kind regards,
Gerald
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: alatak on October 24, 2015, 14:06:42 PM
Hello
hum...
which php version do you have?
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: alatak on October 24, 2015, 14:13:47 PM
Hello
Hum...
I added more infos in this new version.
Please try it
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: gba on October 24, 2015, 20:36:29 PM
Hi!

PHP 5.5.28

Here is the sofort.0.log.php with the new version:
Quote2015-10-23 17:28:21 DEBUG plgVmOnPaymentNotification: OK
2015-10-23 17:28:21 VMDEBUG SOFORT: getNotification Var1:
2015-10-23 17:28:21 ERROR plgVmOnPaymentNotification: SOFORT notification return Error Error: :
2015-10-23 17:28:21 ERROR plgVmOnPaymentNotification: no transaction ID for order number151023192701
2015-10-23 17:28:21 VMDEBUG SOFORT: plgVmOnPaymentNotification no transaction ID for order number151023192701 Var1: SofortLib_Notification Object
(
    [_parameters:protected] => Array
        (
        )
    [_response:protected] => Array
        (
        )
    [_transactionId:SofortLib_Notification:private] =>
    [_time:SofortLib_Notification:private] =>
    [_validateOnly:protected] =>
    [_apiVersion:protected] => 1.0
    [errorPos] => global
    [errors] => Array
        (
            [error] => Array
                (
                    [message] => could not parse message
                )
        )
    [warnings] => Array
        (
        )
    [enableLogging] =>
    [errorCountTemp] => 0
    [SofortLibHttp] => SofortLib_Http Object
        (
            [headers] => Array
                (
                   
  • => Authorization: Basic Og==
                        [1] => Content-Type: application/xml; charset=UTF-8
                        [2] => Accept: application/xml; charset=UTF-8
                        [3] => X-Powered-By: PHP/5.5.28
                    )
                [connectionMethod] =>
                [compression] =>
                [proxy] =>
                [url] =>
                [info] =>
                [error] =>
                [httpStatus] => 200
                [_response:protected] =>
            )
        [SofortLibLogger] => SofortLibLogger Object
            (
                [fp] =>
                [maxFilesize] => 1048576
            )
        [_apiKey:protected] =>
        [_userId:protected] =>
        [_products:protected] => Array
            (
               
  • => global
                [1] => sr
                [2] => su
                [3] => sv
                [4] => ls
                [5] => sl
                [6] => sf
            )
        [_logfilePath:SofortLib:private] =>
    )
Kind regards,
Gerald
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: alatak on October 27, 2015, 16:46:25 PM
Hello
I have fixed 2 issues i found this morning.
It works on my test environnement
but still not for you

the POST is empty, and i still do not understand why
Could it be that you have some protections like a jHackGuard plugin. I checked, but i did not find.
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: gba on October 28, 2015, 13:52:09 PM
Hi!

I want to try the installation on another webserver.
Could you, please, give me the latest sofort.zip?

Kind regards,
Gerald
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: gba on November 02, 2015, 11:42:29 AM
Hello!

I just tried the installation on another server - same behaviour.
It would be interesting to test with the latest version of sofort.zip...

Anyone else any idea?

Kind regards,
Gerald
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: Milbo on November 03, 2015, 18:50:34 PM
After hours being no the webpage, it seems it was a broken "eu cookie" plugin, which created a problem with the session. It leads me again to point on our Stickie
http://forum.virtuemart.net/index.php?topic=78322.0
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: gba on November 09, 2015, 17:30:26 PM
Hi all!

As we found out, the cookie plugin didn't do any harm.

If I understood it right, the actual reason for this issue is:
SOFORT.de is trying to contact VM using 'www.mywebsite.com/index.php' via POST (here www.mywebsite.com is an example for the domain of the website).
When Joomla!3 is getting this request, it redirects to the SEFed default language URL 'www.mywebsite.com/index.php/de/'.
Due to this redirect, SOFORT.de assumes, the POST request did not succeed and tries it again using 'www.mywebsite.com/index.php/de/' via GET.
But VM tries to process a POST request, not a GET.
This is the real reason, why VM and SOFORT.de do not communicate right, when the Joomla SEF-URL function is ON.

The solution seems to be:
Either Joomla should allow SEF-requests without language shortcut, or VM should have kind of a fallback to process SOFORT.de's second try via GET.

I assume, that the better solution would be the first one.
How can we move the Joomla team to fix that?

Kind regards,
Gerald

Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: gba on November 12, 2015, 10:37:47 AM
Hello all!

A temporary workaround could be to set 'Remove URL Language Code' to 'Yes' in the 'System - Language Filter' plugin.
What do you think about that?

Kind regards,
Gerald
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: Milbo on November 25, 2015, 13:02:16 PM
Quote from: gba on November 09, 2015, 17:30:26 PM
But VM tries to process a POST request, not a GET.
Nono, VM tries to process the raw! Neither POST, nor GET. The correct configuration is to Remove the language prefix for the default language.
Title: Re: Sofort ERROR plgVmOnPaymentNotification: no transaction ID
Post by: lindapowers on November 27, 2015, 07:12:09 AM
This works for us fine even with language prefix, maybe the fact that we use hidden menu items to cart and vm categories with defined language avoids issues. Also we use a home menu assigned to all languages.