Project:Ubercart ClickandBuy Payment Method
Version:5.x-1.1
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hello,
after Doing a Test Buy, the payment is not done and I got the following error:
ClickandBuy transaction 0 failed:
"Invalid transaction code"

Might be a Click and Buy Error (to be true, I hate their support and the webinterface isnt clearly to understand).

Is this module working anywhere?

Best Regards
Christoph

Comments

#1

Hi Christoph,

I had the same problem. In my case the reason for the problem was that the header called HTTP_X_TRANSACTION was always set to zero. This header is sent buy clickandbuy to your server after the user has confirmed the payment on the clickandbuy website. This header had the value 0 because at the clickandbuy website I entered a username that I had put in the group of users who are allowed to use the offer for free. You can find more information about that at https://eu.clickandbuy.com/servicebereich/anbieter/angebotsverwaltung/mi.... You find the appropriate dialogue in your clickandbuy account when you click at the link "Access Administration". Does that solve your problem?

Obviously it is a bug that you cannot complete checkout with a user who should be allowed to use the offer for free. But honestly currently I am not sure how the transaction script (uc_clickandbuy.module) should know that everything is fine although HTTP_X_TRANSACTION is set to 0. While investigating this I logged all headers sent by clickandbuy via watchdog and found a header called HTTP_X_BILLEDAMOUNT which was set to 0 as well. Probably the script should consider this header as well but I am really very unsure about this. I have also looked at the example transaction script provided by clickandbuy which you can find at http://clickandbuy.com/EU/en/merchantportal/technicaldocs/transactionsys.... And even they say in their script that there is an error if HTTP_X_TRANSACTION is set to 0. Well, probably this is a bug in their example script. Or the bug is that HTTP_X_TRANSACTION is set to zero for these certain users.

Have a nice day,
Fabian

#2

This is a problem with ClickandBuy's specification, as on page 12 it explicitly says:

The transaction script must make an evaluation of the above values as follows:
Verification the transaction ID returned is not 0.

So the module is not supposed to mark the transaction as successful if this is 0 - but then later on page 21 it also says:

HTTP_X_TRANSACTION will always be returned as 0 for accounts listed in your free user group and such purchases will result in a failure in the second transaction handshake.

The module is unable to verify whether 0 means the transaction failed or that the user was in the free user group, so I'm wary of removing this check.