Forums / Bug Reports / [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

[Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

Locked

Views: 2,431

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
8 Oct 2010, 6:40 PM
#1
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

[Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

Dr Byte - There are many prior threads about this, but I don't know if this is exactly the same because no coupons or GV's are being used. It's the dreaded SGS-002301 response code.

Response Code:  SGS-002301: Charge total must be the sum of subtotal, tax,
value added tax, and shipping.

=================================

Sending to Gateway: 
result = LIVE
oid = 29388-0tuOd5
subtotal = 7.28
shipping = 2.07
tax = 0.64
chargetotal = 9.98

As you can see from above, if you add all the values, it equals $9.99 instead of $9.98. No coupons are being used. Any ideas?

  • Jeff
8 Oct 2010, 6:50 PM
#2
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

Just to add, the chargetotal is off by one penny when you add up the values. I do see the following code in the API around Line 434, but I don't want to touch anything or else more stuff will break!

 // resubmit without subtotals if subtotal error occurs
    if ($result["r_approved"] != "APPROVED" && !($result["r_approved"] == "SUBMITTED" && $result["r_message"] == 'APPROVED')) {
      if (in_array(substr($result['r_error'],0,10), array('SGS-002301', 'SGS-010503'))) {
        foreach(array('items', 'subtotal', 'tax', 'shipping') as $i) {
          if (isset($myorder[$i])) unset($myorder[$i]);
        }
        $myorder["oid"] .= '-b';
        [b]$myorder["chargetotal"] = ($myorder["chargetotal"] - 0.01);[/b]
        $result = $this->_sendRequest($myorder);
        if (!is_array($result)) {
          $messageStack->add_session('checkout_payment', MODULE_PAYMENT_LINKPOINT_API_TEXT_FAILURE_MESSAGE, 'error');
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
        }
      }
    }

I didn't know if adding a THIRD block option would work. For example, if the above code fails, do again but ADD one penny or something. I guess I would need to see if more failures occur due to it being off by a penny or not.

In the meantime, any idea or tweak to allow something like the above transaction to process?

  • Jeff
9 Oct 2010, 4:57 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

That section of code is not relevant to the logs you posted. It is not the cause of your problem. Thus a "THIRD block" would be pointless.

.
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.

9 Oct 2010, 3:30 PM
#4
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

Do you have any other ideas, Dr Byte? Or is there any other thing I can send to help troubleshoot why it would be off by one penny? Right now, my LinkPoint module is set debug mode: Failure Alerts Only.

It's just weird because other orders place fine into the system, but since the upgrade, we're seeing quite a few of these SGS-002301 errors all of the sudden.

  • Jeff
9 Oct 2010, 5:17 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

Upgrade from which version?

.
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.

9 Oct 2010, 6:14 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

To investigate further, I'll need to know exactly how to recreate this exact transaction scenario from a fresh clean uncustomized install. ie: currency used, tax rates, shipping rates, product price, etc.

.
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.

22 Oct 2010, 10:58 PM
#7
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

Here's what the latest customer did to reproduce.

Add the following two items to the shopping cart:

Make sure you're registered with a California address so tax will be applied. When you get to the checkout area, it should list the following:

subtotal = 7.70
shipping = 2.92
tax = 0.67

That adds up to $11.29, but the linkpoint module is processing $11.30, thus giving the error.

  • Jeff
23 Oct 2010, 1:25 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

I'm trying to reconstruct it.
Is that an 8.7% tax on products only, with no tax on shipping?

.
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 Oct 2010, 6:32 PM
#9
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

It's a 8.75% tax on California purchases. I imagine it's rounding that amount up (due to the .75 percentage) and making it a 8.8%? I think the common denominator is that all these examples I see are all from people getting charged Sales Tax. However, it's not ALL orders with sales tax. We have many California purchases which go through just fine....but when we have an error described in this thread, they are always orders with California tax being calculated.

  • Jeff
24 Oct 2010, 10:39 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g

I can't seem to repeat the problem. Maybe it's because I'm using slightly newer code.

Try this updated module to replace your current v1.3.9g version of the file:

.
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.