Closed (fixed)
Project:
Ubercart
Version:
6.x-2.4
Component:
Payment
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
11 Feb 2011 at 20:28 UTC
Updated:
2 Mar 2011 at 16:11 UTC
My site was working just fine...
Then for no apparent reason I started getting these...
"REJECTED: this transaction has been approved Authorize.net emulation"
Which had been discussed and solved with a different gateway here...http://drupal.org/node/630474
However I tried that fix and got no where.
Of course when this happens the order stays in checkout because the balance is unpaid - and so it breaks my workflow big time.
I then did a completely fresh, minimal install on Web Enabled and got the same problem so i know it is not my host or my install.
Quantum Gateway swears they did not change anything.
Sure could use some help here folks.
Thank you.
Comments
Comment #1
rgsProblem solved, don't know why it was working then stopped.
This fix applies to use of authorize.net emulation on with the QUANTUM GATEWAY, a great alternative to Authorize.net
On line 575 of uc_authorizenet.module I commented out the original line and replaced it with the line below as shown.
As originally written it was not removing quotes and throwing two extra characters in each field.
// Trim off the encapsulating character from the results.
for ($i = 0; $i < count($response); $i++) {
/** $response[$i] = substr($response[$i], 1, strlen($response[$i]) - 2); */
$response[$i] = substr($response[$i], 2, strlen($response[$i]) - 4);
}
Comment #2
DaveNotik commentedJust got off phone with CDGCommerce (which also uses Auth.Net emulation via Quantum Gateway) regarding this very same issue. I too suddenly started experiencing failed transactions, where the return reported the transaction was successful, but the return string was obviously delimited incorrectly. Steve at CDGCommerce said he may have remembered a similar issue on Friday, but otherwise wasn't initially prepared to accept it was on his side (even though it suddenly started happening, and both on Ubercart and CiviCRM) and so I ran some debugs and the like. Even though we're passing in the standard quote (") as the delimiter, we're getting back a backslash and quote (\"), which is throwing things off.
I found this page while on the phone, and used your code to change the delimiter, and it seems to work now. I have to figure out this same hack on the CiviCRM side.
The real solution, however, has to come from CDGCommerce's side. Steve assures me they're on it and will report back w/ a fix. I hope they come through quick, because I don't want to have to change my payment processor company for my clients.
--D
Comment #3
DaveNotik commentedGot the message below, and the issue seems to be resolved now. Would still like to see some follow-up from CDGCommerce.
The following is a message from CDG Support:
--------------------------------------------
Dear David
Seems drupal is not striping slashes. We added some code to prevent this issue to happen again. Please try a test transaction now, and if you still have this issue, you will need to do a change in code in the uc_authorizenet.module file
Locate this:
for ($i = 0; $i < count($response); $i++) {
$response[$i] = substr($response[$i], 1, strlen($response[$i]) - 2);
Instead of that last line (the one that starts by $response[$i]....
change it to be:
$response[$i] = substr(stripslashes($response[$i]), 1, strlen(stripslashes($response[$i])) -2);
But again, only do it if it fails again after the test.
Regards,
Andres Roca
Zend Certified Engineer
CDGcommerce
Project Development, IT
888-586-3346 Ext 810
Hours 10am-6pm Eastern Monday-Friday
Comment #4
rgsThere is no doubt in my mind that something happened at the Quantum end to break the Drupal workflow - specifically the throwing of extra characters.
Anyway a drupal/ubercart/authorize.net emulation should now work out of the box. I assume the same for civiCRM. See above for background.
I'm attaching below the last response I received from Quantum only for documentation purposes...again....no workaround should be necessary to get authorize.net emulation working with CDG Commerce/Quantum Gateway.
Despite the problems they seem to be responsive if you squeak loud enough.
--------------------------
Hi Ray
This is Andres from Quantum Gateway technical Support staff. I left a voice
message to you regarding Drupal core change I told you to do on last week.
Well, wanted to let you know that change won't be longer needed. We did some
customization to detect when a transaction comes from that module and change
it accordingly. So, you need to change it back as it was.
You told me on chat you left it as:
for ($i = 0; $i < count($response); $i++) {
/** $response[$i] = substr($response[$i], 1, strlen($response[$i]) - 2); */
$response[$i] = substr($response[$i], 2, strlen($response[$i]) - 4);
Well, you just need to uncomment the commented line, and remove the last
line.
Regards,
Andres Roca
Quanrum Gateway LLC
Project Development, IT
888-586-3346 Ext 810
Hours 10am-6pm Eastern Monday-Friday