Error in Watchdog:
"Incoming total for order %d did not match our internal total of %d"
Basically, the total gets recalculated for the order and compared to what Cashnet sends back. The recalculated total doesn't match because it's not calculated the same way as what we originally sent to Cashnet.
I had an order be sent as $50.57, but when it was recalculated, the code was getting $50.565.
We should recalculating the order total the exact same way as it was submitted, using uc_price().
The translation tokens were incorrect in the watchdog call, so I'll fix those too.
I was also getting the following error in the watchdog:
Warning: in_array() expects parameter 2 to be array, string given in uc_referer_check() (line 2093 of .../modules/ubercart/uc_store/uc_store.module
I think this patch may fix that as well, though I'm not sure of the source of that error.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screen Shot 2012-04-18 at Apr 18 3.00.41 PM.png | 265.38 KB | uwggweb |
| #2 | Screen Shot 2012-04-18 at Apr 18 3.00.22 PM.png | 183.91 KB | uwggweb |
| #2 | Screen Shot 2012-04-18 at Apr 18 2.38.37 PM.png | 732.97 KB | uwggweb |
| #1 | uc_cashnet-totals-dont-match-1493128-1.patch | 1.38 KB | millenniumtree |
Comments
Comment #1
millenniumtreeFixes order total calculation error.
Comment #2
uwggweb commentedWe have a similar problem on our site where when the order value at checkout is $1,000 or greater, the amount that is reported to CashNet is much higher. Examples: $1,000 at checkout is reported as $11,000 on CashNet payment page, $2,000 reported as $21,000, and $3,000 reported as $31,000. Screenshots attached.
Would this patch fix this problem? If so, how do I implement the patch? Sorry if that's a noobish question, but I haven't had to install a Drupal module patch before. Any and all help appreciated!
Thanks!
Comment #3
chrisfromredfinThis looks right. Will roll soon.
Comment #4
uwggweb commentedSorry! Disregard the second screenshot. Here is the correct one that shows the wrong number being display on the CashNet page.
Comment #5
chrisfromredfinmillenniumtree's patch has been included in what should show up as a -dev release in the next 12 hours. uwggweb, I'd like you to test with this -dev release once it's rolled and let me know if it fixes your "too many thousands of dollars" issue or not. My hunch is it won't, but we'll re-open a new issue for that once it's determined.