Closed (fixed)
Project:
Ubercart PaymentExpress - DPS PXPay & PXPost
Version:
6.x-1.x-dev
Component:
Code - PXPay
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Dec 2010 at 22:17 UTC
Updated:
20 Jul 2019 at 16:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
snlnz commentedOK so I reset the auto_incremement order id with an sql query
alter table uc_orders auto_increment = 09;
Tested a transaction and all is well so this is rather a limitation in DPS and should be better documented in the error message perhaps?
Comment #2
xurizaemonCan you tell us why you think there's a connection between the order ID and the failed transaction ID?
Comment #3
snlnz commentedMy understanding is that there is a 16 character limitation on the txnid submission to DPS.
I figured, the transaction ID is generated automatically but it appends the order prefix id to the transaction string then attempts to send to DPS. If the total order-prefix + transaction string (TXNID) generated number adds to greater than 16 characters you see this issue.
Hope that helps?
Comment #4
xurizaemonPatch attached. Please try this code, and bump your order_id incrementor back up to 10,000 or so to see if the bug gets set off again? As uniqid adds 13chars, you probably only need an order_id >999 to trigger this issue.
I should ask @rjmackay about the use of uniqid in this code, and whether the transaction ID needs to be *unique* or just *unguessable*. I suspect the transaction ID needs to be unique per transaction attempt, and that we need to allow for the chance of multiple transaction attempts per order. Using uniqid here makes it hard to guess the transactionid, but it will be easier to guess once you hit tens of billions of transactions*.
To my mind an incrementing counter would be more useful, because then in the DPS interface we'd see that 4324-1 means this is transaction attempt #1 for order 4324. If we don't actually need it to be unguessable, there's not much advantage in stuffing the transactionID variable with lots of random letters.
* Module users approaching the upper reaches of many billions of transactions are welcome to contact me directly discuss such issues, over some very fine whiskey. My shout.
Comment #5
rjmackay commented> To my mind an incrementing counter would be more useful, because then in the DPS interface we'd see that 4324-1 means this is transaction attempt #1 for order > 4324. If we don't actually need it to be unguessable, there's not much advantage in stuffing the transactionID variable with lots of random letters.
I think you're right on that one.
Txn id just needs to be unique, but incrementing it for transaction attempts should be sufficient: http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay...
No idea why I used uniqid() any more. I think merchant reference shows up in the DPS interface which is what I used if I needed to search - but if txnid is available it would be useful to make that readable too.
Sorry - I'm not using DPS or this code anymore so I can't test for you.
Comment #6
xurizaemonLooks like the uniqid came from something like this in pxaccess.inc -
Will commit the substr() workaround for now, and revisit the incrementing ID in this issue "soon".
Comment #7
xurizaemonsoon = if someone needs it and re-opens this issue
i like the incrementing id
Comment #8
millionleaves commentedHow soon is now?
I'm having this issue on a site, and despite updating to the March 2012 release of the module, the issue won't go away.
I get to Review Order without problems. I click to go through to payment and it comes back with the "We're sorry...." error. Drupal log reports "Transaction request failed. Order ID: 64. XML:" There's nothing after XML in the log.
I'm technical but not a developer, so am not quite technical enough to troubleshoot this further on my own .... but am willing to be guided....
This module has been working in the past. It's not a busy store that I maintain part-time and I don't know when the issue first arose.
Thanks
David
Comment #9
xurizaemon@millionleaves, could you please confirm a few things?
1. paste a copy of the error message you see
2. installed module version (from modules page)
3. you are using PxPay component, not PxPost or PxAccess
4. check admin - reports - recent log messages (dblog module) for any other clues
Comment #10
xurizaemon#1649722: uniqid generates overlong txnids on some platforms contains a patch for this, as should the current 6.x-1.x and next 7.x-1.x tarballs
@millionleaves, it's been a couple of months since you re-opened this and no reply from you to questions above, so I'm closing this as presumed fixed.
Comment #13
Vadheruday commentedComment #14
Vadheruday commentedComment #15
Vadheruday commented