Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / Orders over $1k come up as $1, over $2k come up as $2, etc....

Orders over $1k come up as $1, over $2k come up as $2, etc....

Started by baktasht on 24 Jan 2013, 3:39 PM · Views: 978

Results 1 to 7 of 7
24 Jan 2013, 3:39 PM
#1
baktasht avatar

baktasht

New Zenner

Join Date:
Nov 2007
Posts:
8
Plugin Contributions:
0

Post #1 by baktasht

We have been using Zencart for several years. Ever since we switched to our new processor CDG Commerce, and use Quantum Gateway, with the built in Authorize.net (AIM) module, we have been having a very curious issue. All orders $1000-1999 show up on the processor side as $1.00, all orders over $2000-2999 show up as $2.00, all orders of $3000-3999 show up as $3.00, etc....

So far we have just been catching these orders and manually charging them. This sometimes causes a problem because the customer's CC is not authorized for the full amount. Then after we build the order and are ready to ship it the customer's CC is sometimes past it's limit, or something and their CC won't authorize the full payment, and we don't have a pre-authorization for the full amount so we're SOL if the customer decides to ignore phone calls and such. It's a very big hassle since many of our products are custom made and re-selling what is made for one customer may end up taking 6-12 months sometimes.

Has anyone seen this sort of issue? I tried searching the forum and didn't find any other's with the same problem. Any suggestions?

24 Jan 2013, 6:39 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

Something in your code is probably formatting the amount with a comma for thousands-separator and then later treating the comma as an invalid character and chopping off the rest of the amount.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Jan 2013, 9:21 PM
#3
baktasht avatar

baktasht

New Zenner

Join Date:
Nov 2007
Posts:
8
Plugin Contributions:
0

Post #3 by baktasht

DrByte:

Something in your code is probably formatting the amount with a comma for thousands-separator and then later treating the comma as an invalid character and chopping off the rest of the amount.

DrByte,
That's what I was thinking as well. But I'm not finding where in the payment module that code is located. Any ideas? We're using the Authorize.net (AIM) payment module.

24 Jan 2013, 10:31 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

This line in the AIM module formats the price by inserting a thousands separator and ensuring 2 decimal places:```
'x_amount' => number_format($order->info['total'], 2),

Perhaps CDG/Quantum's gateway emulator isn't using the exact same code as authorize.net and doesn't intelligently handle the comma on their end.
It would be smart for them to fix it on their end.

If they insist on not accommodating such a common thing, then you could adjust your code to this instead:```
                         'x_amount' => number_format($order->info['total'], 2, '.', ''),
```This will remove the comma from the data submitted to them, and should not affect anything else.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Jan 2013, 10:35 PM
#5
baktasht avatar

baktasht

New Zenner

Join Date:
Nov 2007
Posts:
8
Plugin Contributions:
0

Post #5 by baktasht

I just opened a ticket with them this morning as well to see if they can work ont his issue. In the mean time incase they move slowly on this issue I'd like to get it working properly on our end.

Do you think that using the code as you listed would cause any other potential problems or formatting errors?:
'x_amount' => number_format($order->info['total'], 2, '.', ''),

25 Jan 2013, 12:46 AM
#6
baktasht avatar

baktasht

New Zenner

Join Date:
Nov 2007
Posts:
8
Plugin Contributions:
0

Post #6 by baktasht

DrByte:

This line in the AIM module formats the price by inserting a thousands separator and ensuring 2 decimal places:```
'x_amount' => number_format($order->info['total'], 2),

> Perhaps CDG/Quantum's gateway emulator isn't using the exact same code as authorize.net and doesn't intelligently handle the comma on their end.
> It would be smart for them to fix it on their end.
> 
> If they insist on not accommodating such a common thing, then you could adjust your code to this instead:```
                         'x_amount' => number_format($order->info['total'], 2, '.', ''),
```This will remove the comma from the data submitted to them, and should not affect anything else.

DrByte,
I've implemented your suggested change, tested with various credit cards at values from $1.50 all the way to $3500 and they're being processed correctly now. Hopefully the Quantum Gateway staff gets the error fixed on their end as well so that other folks don't have the same issue in the future. Thanks for the help!!
25 Jan 2013, 4:06 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #7 by drbyte

Glad it worked for you :)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.