Closed (fixed)
Project:
QuickPay payment gateway
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2016 at 14:07 UTC
Updated:
12 Mar 2016 at 18:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cslevy commentedPatch which fixes the issue, for Commerce Quickpay
Comment #3
cslevy commentedComment #4
xen commentedYou need to come up with a better explanation. If it didn't work in general, I'm sure it would have been noted before now.
Why is it not saved?
Comment #5
cslevy commentedThe callback url is generated from this $order_number. See quickpay.transactions.inc line 187.
After you return from quickpay the commerce_quickpay_quickpay_callback function is called, where you try to load the commerce order by this order_number.
If the order_number == order_id then this will load the order and will add a transaction to the order. If these values are not equal the order will not be loaded.
See the implementation of commerce_quickpay_quickpay_callback in commerce_quickpay.module
If you don't customize the order number and you use the standard implementation where order_number = order_id then you won't have this problem. I needed custom order_numbers so I encountered this problem.
Comment #6
xen commentedAaah. That's indeed a bug, but that's too much code to fix it.
I assume that all the code apart from changing the order_number here: http://cgit.drupalcode.org/quickpay/tree/modules/commerce_quickpay/comme...
to order_id, was added in order to ensure that QuickPay gets the order_number instead of order_id?
So instead I'll suggest dropping your changes, and instead change:
http://cgit.drupalcode.org/quickpay/tree/modules/commerce_quickpay/comme...
to use commerce_order_load_by_number() instead, which makes it a one line fix.
Mind trying that?
Comment #7
cslevy commentedToo mutch or not...
I created another patch like you suggested, but the truth it that I had to modify in more lines in order to make this to work, and also to have suggestive variables.
Check the attached patch.
Comment #9
xen commentedGood catch on the other load and the renaming of variables, thanks. Committed.
1.12 release coming up shortly.