Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Linkpoint Error -- SGS-020003: Invalid XML

Linkpoint Error -- SGS-020003: Invalid XML

Locked

Views: 16,747

Results 1 to 20 of 25
This thread is locked. New replies are disabled.
1 Feb 2008, 3:51 AM
#1
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Linkpoint Error -- SGS-020003: Invalid XML

Okay, I am not using the low order fee module, I don't even have it installed.

I need on this very badly and very urgently.

The vast majority of my customers who tried to use credit cards failed to do so. All of them reporting theSGS-020003: Invalid XML error message.

I followed a link in another Linkpoint thread receiving this same error and tried installing the linkpoint_api.php file that was found there (as a solution for this problem when caused by the low order fee module). I also do not have the COD Fee module installed.

I really need to get this working!!

Please help...

1 Feb 2008, 3:28 PM
#2
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

Here is the Debug Log from a test order I tried this morning (note - in testing mode, it worked fine, approved/declined as set). In live mode, I did a test purchase and got the following response:

Your card has been declined. Please re-enter your card information, try another card, or contact the store owner for assistance.

Debug Information below:

Feb-01-2008 10:06:22

Response Code:

Sending to Gateway:
result = LIVE
oid = 379-gkyOX8
ip = 67.166.216.142
ponumber =
subtotal = 2
tax = 0
shipping = f
chargetotal = 2
cardnumber = ******
cardexpmonth = 05
cardexpyear = 08
cvmindicator = provided
cvmvalue = ******
userid = 1
customerid = 1
name = Timothy P Dugger
company =
address1 = 4 N. Blanche Ave.
address2 =
city = xxxx
state = Georgia
country = US
phone = xxx-xxx-xxxx
email = tim AT xxxxxxxxx DOT com
addrnum = 4 N. Blanche Ave.
zip = xxxxx
sname =
saddress1 =
saddress2 =
scity =
sstate =
szip =
scountry =
comments = Website Order
items = Array
(
[1] => Array
(
[id] => 494:c84594c6da518c142af78bcff25f87ca
[description] => Express Additions #6
[quantity] => 1
[price] => 2.00
[options0] => Array
(
[name] => Download 1
[value] => PDF
)

    )

)

ordertype = SALE
host = secure.linkpt.net
port = 1129
keyfile = D:/Domains/ironcrown.com/wwwroot/shop/includes/modules/payment/linkpoint_api/xxxxxx.pem
configfile = xxxxxx
transactionorigin = ECI
terminaltype = UNSPECIFIED

Result:
(
[r_csp] =>
[r_time] =>
[r_ref] =>
[r_error] => SGS-020003: Invalid XML
[r_ordernum] =>
[r_message] =>
[r_code] =>
[r_tdate] =>
[r_score] =>
[r_authresponse] =>
[r_approved] =>
[r_avs] =>
)

I do not have the low_order_fee module enabled, I don't even have it installed.

The only Order Modules I have installed are the following:
Discount Coupon (ot_coupon)
Group Discount (ot_group_pricing)
Gift Certificates (ot_gv)
Shipping (ot_shipping)
Sub-Total (ot_subtotal )
Tax (ot_tax )
Total (ot_total)

The only payment modules I have are PayPal IPN and the Linkpoint API

The only shipping modules are the UPS and the USPS modules.

And when I upgraded from 1.3.7 (did not have Linkpoint installed in 1.3.7 at all) to 1.3.8a, I uninstalled all of the Shipping and Payment modules and then reinstalled them

I have it set to accept Visa, MC, Discover, and AmEx cards only, and to require the CVV.

I have like 4 and a half pages worth of CC attempts by customers and other than my test mode attempts, only 3 or 4 CC attempts have actually succeeded, and those were early on. Of the remainder, about 6 or so attempts are validation failures. The rest are this Invalid XML error.

I really really need to get this fixed as fast as possible!! Any help that anybody can give would be appreciated!!

1 Feb 2008, 4:35 PM
#3
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

Also, I have verified with my host that port 1129 is open (they have other customers who use linkpoint) and that cURL is installed and working.

Question regarding my PEM file.... I open it in a text editor and it looks like this:

-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQC0uDlNvBeaxJ0eRq6OKzjP7bzsdXDI1hc4OdH11a43wVUM/f4E
9hM7Laz1b5wEN3dzU1iR+8gGiG3sXtT5GXdiiiDlFnNmfVcxFuwCmqpN2H3wxJPb
uqTgcVuywJj7EhiQMJn4aNzaxPzkmVNUWANzlgaaN9pczqyiARtesJQIewIDAQAB
AoGBAIBSO2ZGA6DCsSnZWILcj+ec0MQ6E86Xrj8fV0Wu55jxb3ndNCzDqh4gLarN
mTHXAkDWUXuPIs/LEOLlNwZprJ5ViTG0gth95jBO4/4R6vPMFOvZzm3DaaUCQATX
Yer0RKVMd+z1WqbNnMwssL9113Ux3bee8GiXEg1drWzD5rtqQaTkXS96j9pjKXLV
75zQi1a6yVb0fdfvV8ECQQCBBwfYcwhlxXZd+3VoO+43evY24ZdD4rMzYAe8CG6S
wWn843b9NrJmZMCLqwWqxb/IDkmBu0G2500yYCCo1c3C
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIICaTCCAdICAQAwDQYJKoZIhvcNAQEEBQAwfTELMAkGA1UECBMCVkExGDAWBgNV
BAcTD0NIQVJMT1RURVNWSUxMRTEdMBsGA1UEChMUSUNFKElST04gQ1JPV04gRU5U
UCkxFTATBgNVBAMTDEhFSUtFIEtVQkFTSDEeMBwGCSqGSIb3DQEJARYPaWNlcHJl
ekBhb2wuY29tMB4XDTAyMDExODE0NDUyN1oXDTMyMDExNjE0NDUyN1owfTELMAkG
SIb3DQEBBAUAA4GBAInQdZLAUKDkfVg1btDYKsfoaWtiD6x4OHCn4S6dY5mdQ0Co
ZoFe6F0A1wQ6acIqIv/jbl18d5f9oFUjytGwbhD7yrDESbnoqyjcmL+EiT2zPuTh
hMFcbvfQQJPomzxsXIJhiOj612ewOqVis3JXjP2lEt2RhOi9h4ZiN48e+07d
-----END CERTIFICATE-----

**Note: **I did cut several lines out of the middle of each block.

Each block has 65 characters per line. Is that correct (that was how I received the file)? Or should the section between the Begin and End lines be a single line?

I have scoured the forums looking for possible fixes. I am open to any and all suggestions...

1 Feb 2008, 5:44 PM
#4
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

oh! and here are the module settings itself (in case it helps any in figuring this out)...

Enable Linkpoint Module
True

Linkpoint/YourPay Merchant ID
xxxxxx (I removed my actual PEM number)

LinkPoint Transaction Mode Response
LIVE: Production

Authorization Type
Immediate Charge/Capture

Set Order Status
Paid [2]

PREAUTH Order Status
Pending [1]

Refund/Void Order Status
Canceled [6]

Sort order of display.
0

Payment Zone (restrict to)
--none--

Fraud Alerts
Yes

Enable Database Storage
True

Debug Mode
Log File

2 Feb 2008, 1:19 PM
#5
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

Does anybody have any ideas or suggestions?

2 Feb 2008, 1:43 PM
#6
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

Okay!!! I now know why it is failing but I don't know how to fix it.

As I said before, it has failed on most of the orders put through it. The reason is that most of the orders are PDF purchases.

And that means that the stuff looks like this...

Feb-01-2008 10:06:22

Response Code:

Sending to Gateway:
result = LIVE
oid = 379-gkyOX8
ip = 67.166.216.142
ponumber =
subtotal = 2
tax = 0
shipping = f

However, anytim there is a number (instead of an "f"), the order goes through without the error at all!!

Can somebody tell me how to fix it so that there is a zero instead of an f for shipping on products that don't get charged shipping?

2 Feb 2008, 2:15 PM
#7
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

In the linkpoint_api.php file in the modules/payment directory,

I changed the following line:

$myorder["shipping"] = $order->info['shipping_cost'];

to

**
if ($order->info['shipping_cost'] == 'f')
{
$myorder["shipping"] = 0;
} else {
$myorder["shipping"] = $order->info['shipping_cost'];
}
**

And that seems to have fixed my problem. A PDF order that failed for me yesterday is now working.

2 Feb 2008, 2:45 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Linkpoint Error -- SGS-020003: Invalid XML

Thanks for posting your solution

2 Feb 2008, 2:50 PM
#9
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

DrByte:

Thanks for posting your solution

I always try to post whatever solutions I come up with..

If I knew where to find where Zen Cart sets the "f", I would have changed it there, but I have no idea where that is...

So, I changed it on the Linkpoint side, where it is formatting everything for Linkpoint.

:clap:

7 Feb 2008, 5:06 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: Linkpoint Error -- SGS-020003: Invalid XML

As far as I can tell, your solution is fine.

I think I'd condense it into one line, like the following, but that's just cosmetic. The end result is the same:

line 294 changes from this:$myorder["shipping"] = $order->info['shipping_cost'];to this:```
$myorder["shipping"] = ($order->info['shipping_cost'] == 'f') ? 0 : $order->info['shipping_cost'];

7 Feb 2008, 5:23 PM
#11
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

cool! thanks! I am not a programmer, so anything I do is likely to be ugly looking at best.. hehe

7 Feb 2008, 5:30 PM
#12
pcrepairzone avatar

pcrepairzone

New Zenner

Join Date:
Feb 2008
Posts:
1
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

Hello Rasyr, did you fix your issue?

I had the exact same one, and i manage to fix it, after spending, 4 hours with the smart ones at linkpoint, they point me to the right direction, i think i can help out, just let me know how, you can check out my site at Computer Repair Zone

:clap:

Thanks

29 May 2008, 1:15 PM
#14
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

I found another reason for receiving this error (and have gotten it several times because of this other reason).

If the purchaser name or address includes any invalid characters, it will throw this error.

The one that keeps throwing it for us is the degree symbol in the address. It is used in some countries in much the same way that the # is used for us. In the cases where this has happened, we have emailed the customer and told them to remove the symbol from their address, and when they have, the order has gone through correctly.

Not sure if there is a programatic way to correct this, but I thought that I should at least let you know about it.

29 May 2008, 1:20 PM
#15
drbyte avatar

drbyte

Sensei

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

Re: Linkpoint Error -- SGS-020003: Invalid XML

Thanks for the update

29 Aug 2008, 11:02 PM
#16
jeff_mash avatar

jeff_mash

Totally Zenned

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

Re: Linkpoint Error -- SGS-020003: Invalid XML

Any idea why this error would pop up with the Optional Shipping Insurance module? That module works fine with PayPal, but when you try to use a credit card, it declines. Here is the debug email from LinkPoint:

Aug-29-2008 04:49:05
=================================

Response Code: 

Sending to Gateway: 
result = LIVE
oid = 15619-NlXBm0
ip = 69.225.39.198
ponumber = 
subtotal = 2.72
tax = 0.07
shipping = 1.34
chargetotal = 4.13
cardnumber = ******
cardexpmonth = 03
cardexpyear = 11
cvmindicator = provided
cvmvalue = ******
userid = 3
customerid = 3
name = Joe Smith
company = 
address1 = 4 Lado de Loma Dr
address2 = 
city = Vista
state = California
country = US
phone = 209-251-9222
email = [email protected]
addrnum = 4 Lado de Loma Dr
zip = 92011
sname = Test Test
saddress1 = 4 Lado de Loma Dr
saddress2 = 
scity = Vista
sstate = California
szip = 92011
scountry = US
comments = Website Order
items = Array
(
    [1] => Array
        (
            [id] => 1881
            [description] => Plastic Wallet for Cards
            [quantity] => 1
            [price] => 0.97
        )

    [2] => Array
        (
            [id] => Surcharge
            [description] => Shipping Insurance (Protect Your Package):
            [quantity] => 1
            [price] => 1.75
        )

)

ordertype = PREAUTH
host = secure.linkpt.net
port = 1129
keyfile = /home/censored/public_html/store/includes/modules/payment/linkpoint_api/1018371.pem
configfile = 1018371
transactionorigin = ECI
terminaltype = UNSPECIFIED


Result: 
(
    [r_csp] => 
    [r_time] => 
    [r_ref] => 
    [r_error] => SGS-020003: Invalid XML
    [r_ordernum] => 
    [r_message] => 
    [r_code] => 
    [r_tdate] => 
    [r_score] => 
    [r_authresponse] => 
    [r_approved] => 
    [r_avs] => 
)

And yes, we do have the latest LinkpointAPI file which DrByte released earlier this year. I am at a loss on this one. Wondering if it has something to do with the line item:

[2] => Array
        (
            [id] => Surcharge
            [description] => Shipping Insurance (Protect Your Package):
            [quantity] => 1
            [price] => 1.75
        )

Any ideas?

29 Aug 2008, 11:06 PM
#17
jeff_mash avatar

jeff_mash

Totally Zenned

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

Re: Linkpoint Error -- SGS-020003: Invalid XML

Actually, I just found my answer! In the language file, I had edited the display and added some hidden HTML to make the text red in color. That apparently was the issue. When I removed it, everything worked fine.

30 Aug 2008, 12:07 AM
#18
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

Thanks for the follow up on how you fixed the problem.

11 Dec 2008, 6:44 PM
#19
hmbuhler avatar

hmbuhler

New Zenner

Join Date:
Aug 2008
Posts:
8
Plugin Contributions:
0

Re: Linkpoint Error -- SGS-020003: Invalid XML

I'm having the SGS 20003 error on one gift box. It seems to depend upon the contents of the box (which coffee is chosen) but these same lists work for other parts of the cart. How can I find the offending issue?

Here's one that works:
result=LIVE; oid=506-dKMA9q; ip=209.142.145.124; ponumber=; subtotal=48; tax=0; shipping=7.50; chargetotal=55.5; cardnumber=3723XXXXXXX2003; cardexpmonth=05; cardexpyear=09; cvmindicator=provided; cvmvalue=4002; userid=1; customerid=1; name=michael buhler; company=; address1=7688 w harbor hwy; address2=; city=glen arbor; state=Michigan; country=US; phone=2313343365; email=[email protected]; addrnum=7688 w harbor hwy; zip=49636; sname=michael buhler; saddress1=7688 w harbor hwy; saddress2=; scity=glen arbor; sstate=Michigan; szip=49636; scountry=US; comments=Website Order; items=Array ( [1] => Array ( [id] => 102:02faf4d6e345572b9c7733b842197365 [description] => The Holiday 3 x 3 $48.00 [quantity] => 1 [price] => 48.00 [options0] => Array ( [name] => Grind [value] => Whole Bean ) [options1] => Array ( [name] => 1st Choice [value] => Bakery Blend ) [options2] => Array ( [name] => 2nd Choice [value] => Blend Six ) [options3] => Array ( [name] => 3rd Choice [value] => Cafe Glen Arbor ) ) ) ; ordertype=SALE;

Here's one that declines (SGS-20003):
result=LIVE; oid=506-uOCT9i; ip=209.142.145.124; ponumber=; subtotal=49.5; tax=0; shipping=7.50; chargetotal=57; cardnumber=3723XXXXXXX2003; cardexpmonth=05; cardexpyear=09; cvmindicator=provided; cvmvalue=4002; userid=1; customerid=1; name=michael buhler; company=; address1=7688 w harbor hwy; address2=; city=glen arbor; state=Michigan; country=US; phone=2313343365; email=[email protected]; addrnum=7688 w harbor hwy; zip=49636; sname=michael buhler; saddress1=7688 w harbor hwy; saddress2=; scity=glen arbor; sstate=Michigan; szip=49636; scountry=US; comments=Website Order; items=Array ( [1] => Array ( [id] => 102:f84a86182048c6eb502be18c709ec638 [description] => The Holiday 3 x 3 $48.00 [quantity] => 1 [price] => 49.50 [options0] => Array ( [name] => Grind [value] => Whole Bean ) [options1] => Array ( [name] => 1st Choice [value] => Chocolate Raspberry ) [options2] => Array ( [name] => 2nd Choice [value] => Caramel & Pralines ) [options3] => Array ( [name] => 3rd Choice [value] => Manitou Blueberry ) ) ) ; ordertype=SALE;

Can anyone see what the problem is?

Thanks,
Mike

11 Dec 2008, 9:25 PM
#20
drbyte avatar

drbyte

Sensei

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

Re: Linkpoint Error -- SGS-020003: Invalid XML

It's the & in your attribute description.
A beta patch was posted elsewhere to deal with that. But the fastest way is to remove the & from your attribute names and values.

http://www.zen-cart.com/forum/showthread.php?p=630031#post630031