Closed (fixed)
Project:
Ogone | Ubercart payment
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
29 Sep 2010 at 20:01 UTC
Updated:
11 Jun 2024 at 12:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
bartezz commentedHmmz you are right. Kees, any reason for this not being in there?
I will need uc_Ogone soon and see if I can provide a patch if Kees doesn't have a particular reason for it not being in there.
Cheers
Comment #2
Anonymous (not verified) commentedwho is kees?
Comment #3
bartezz commentedErm the maintainer ;)
Comment #4
summit commentedHi,
Is this still the case on 1.8?
Could you say it in code please?
greetings,
Martijn
Comment #5
cyberschorschIts still a case. I will look into it and try to commit a patch, but for the version 1.9 module.
Comment #6
Hadrien KOHL commentedHi,
This patch solves this issue.
Regards,
Hadrien
Comment #7
cyberschorschThis patch solves the problem.
Comment #8
bartezz commentedNice, #6 works for me thanx!!!
Cheers
Comment #9
cyberschorschIt seems like this patch creates another error:
Duplicate entry '10721' for key 'PRIMARY' query: INSERT INTO uc_payment_ogone (order_id, description, payment_method, order_status, sha1_test_succes) VALUES(*******) uc_ogone/uc_ogone_payment.module in Zeile 532.
This is the line in Function uc_ogone_return_ok():
Comment #10
bartezz commentedI had that error often before applying the patch, didn't have it anymore after applying it?
Cheers
Comment #11
wjroes commented#6 worked for me as well. I am a bit confused because Ogone Ubercart did work before. Or did this started happening in 1.9?
Anyway I'd suggest changing the last line of the patch to:
uc_cart_complete_sale($order, variable_get('uc_new_customer_login', FALSE));So automatic login for new users keeps working.
EDIT - further findings:
I found out that with this patch the order is completed twice and therefore sending emails twice as well.
I believe this very same line is causing this. It completes the checkout and immediately after that your are redirected to cart/checkout/complete where the same function is invoked.
Removing the line seems to work for me.
Comment #12
bartezz commented@wjroes you are right;
After uc_ogone_ok() does a uc_cart_complete_sale() call it does a drupal_goto('cart/checkout/complete'); which calls the uc_cart_checkout_complete() function in uc_cart.pages.inc. In this function another uc_cart_complete_sale() call is made (
$output = uc_cart_complete_sale($order, variable_get('uc_new_customer_login', FALSE));)So indeed uc_cart_complete_sale($order); does not need to be called by uc_cart_complete_sale($order);
New patch attached!
Cheers
Comment #13
wjroes commentedAfter some more testing I found out that many Ogone transactions never get to a Completed state. Even though the Ogone transaction completed succesfully. Apparently a number of customers close the transaction window after it has been completed and before they return to the shop. This leaves the order in Checkout state.
I am wondering why the
uc_ogone_return_okfunction redirects to theuc_ogone_okfunction where the transaction is completed. This involves another redirect that causes the transactions to not be completed in certain circumstances. Why isn't the transaction finished completely inside theuc_ogone_return_okfunction?I suggest that we move the order updating routines from
uc_ogone_oktouc_ogone_return_ok. This way the order is updated to a Payment Received status even if the user decides to close the browser in between. This will then match the actual Ogone status.Any thoughts?
Comment #14
bartezz commentedI've encountered the same issue as well, people don't wait on the redirect and close the window.
Moving the routines sounds like a solution, not sure what effect this change would have though.
Cheers
Comment #15
bartezz commentedHas anyone looked into this yet? Getting more and more orders in checkout which actually have been payed for?!
Cheers
Comment #16
wjroes commentedI moved most of the transaction completion code into the
function uc_ogone_return_ok. This function is called by Ogone and will now update the status in Ubercart. You do still need thefunction uc_ogone_okto make sure the session is kept alive.Comment #17
bartezz commented@wjroes, could you provide a patch for testing?
Cheers
Comment #18
wjroes commentedEuhhhmmm... probably but the file needs some cleaning up. Can I send you the file so you can roll it in a patch. It is just the .module file.
Comment #19
robbertnl commentedDid you clean up the file already? I am also interested in a fix for this problem :)
Comment #20
wjroes commentedHi Robbert,
No, not really. In the meantime I had to upgrade ubercart to 2.6 as well, so I ran into loads of new and old problems. See http://drupal.org/node/1304188
At the moment I seem to have it working again by changing some stuff. These are changes, however, on the latest dev and I cannot believe that this is the way to do it, because I don't think Ogone Payment does work without these changes at all.
Willem
Comment #21
robbertnl commentedHi Willem,
I just made a fresh Drupal installation. So i am using the latest Ubercart as well. With the patch from #12 it is working, as long as the customers don't close the window (and dont wait till they get redirected), right after the payment is finished. I didnt find other bugs at the moment.
Do you know what you changed to solve my problem?
Comment #22
robbertnl commentedPayment is also not created after finishing a succesful payment and clicking on the button "Go back to shop". My order stays in the state 'In checkout' but receiving an confirmationmail of Ogone that i paid
Comment #23
wjroes commentedYou see. That's what I meant with all kind of problems :D
There were related problems caused by the Ogone configuration. I my case we're using different domains for the same shop, i.e. .nl/.de/com etc. With the standard Ogone configuration the redirects from Ogone were sent to the wrong domain leaving the orders in "Payment Received" state.
A different configuration problem was the fact that I had permissions granted to admin users to "show prices without tax" or something. That totally screwed up the order when you went to look at the order in the order list in Ubercart.
Comment #24
robbertnl commented@wjroes, Can you send or attach the changed code? I will diff the files and create a patch file.
Does it also solve the duplicate entry errors (e.g.: user warning: Duplicate entry '0' for key 'PRIMARY' query: INSERT INTO uc_payment_ogone (order_id, description, payment_method, order_status, sha1_test_succes) VALUES('0','description','','','OK') in)
Comment #25
wjroes commentedI think it does. Remember it is just a *dirty* fix that works in my instance. I am surprised that with the way the code was, it is working for others.
My uc_ogone_payment.module attached...
Comment #26
robbertnl commentedThis is a patch based on the latest dev from the code of #25(@wjroes). Thank you wjroes
Comment #27
m.j.laarman commentedin funtion uc_ogone_return_ok i removed trim function. Ogone creates sha1 with untrimmed values while this modules creates sha1 with trimmed values. I fixed this in my project and that solved the problem. Please fix this in future release. Thanks
Comment #28
robbertnl commented#27 Can you elabore how to reproduce this bug? Here its working without removing the trim function.
I just uploaded my changed uc_ogone_module, see http://drupal.org/node/1391626.
I renamed the function uc_ogone_return_ok to 'uc_ogone_update_status'.
Comment #29
m.j.laarman commentedIt should be easy to reproduce. Just submit an order and add a space at the end of one of the fields you use for sha1 calculation. IMHO it's asking for troubles if you modify one of the parameters before sha1 compare.
Comment #30
robbertnl commented#29 You are right. But this only occurs with production settings. I made a new patch as you can see in http://drupal.org/node/1391626
Comment #31
robbertnl commentedFixed in the 6.x-2.x branch.
See http://drupal.org/node/1519734
Comment #32
robbertnl commented