Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 36
  1. #11
    Join Date
    Oct 2006
    Posts
    62
    Plugin Contributions
    0

    Default Re: LinkPoint and Error SGS-005000

    I talked with linkpoint API today as I had another issue with an order. They confirmed it was the attributes that caused the error. Specifically, a text input field that had 240 characters in it (this is a text field used to provide layout instructions for the engraving). I THINK the code responsible for adding the attributes to the gateway submission from the linkpoint_api.php is:

    // itemized contents
    $num_line_items = 0;
    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
    $num_line_items++;
    $myorder["items"][$num_line_items]['id'] = $order->products[$i]['id'];
    $myorder["items"][$num_line_items]['description'] = substr(htmlentities($order->products[$i]['name'], ENT_QUOTES, 'UTF-8'), 0, 100);
    $myorder["items"][$num_line_items]['quantity'] = $order->products[$i]['qty'];
    $myorder["items"][$num_line_items]['price'] = number_format($order->products[$i]['final_price'], 2, '.', '');
    if (isset($order->products[$i]['attributes'])) {
    for ($j=0, $m=sizeof($order->products[$i]['attributes']); $j<$m; $j++) {
    $myorder["items"][$num_line_items]['options' . $j]['name'] = $order->products[$i]['attributes'][$j]['option'];
    $myorder["items"][$num_line_items]['options' . $j]['value'] = $order->products[$i]['attributes'][$j]['value'];
    }

    Those last six lines seem to fit what I see in the linkpoint cc review screen with attribute "Name" then attribute "Value".

    Now I just need to know how to remove it without damaging the rest of the code:)

  2. #12
    Join Date
    Aug 2006
    Posts
    231
    Plugin Contributions
    0

    Default Re: LinkPoint and Error SGS-005000

    if (isset($order->products[$i]['attributes'])) {
    for ($j=0, $m=sizeof($order->products[$i]['attributes']); $j<$m; $j++) {
    $myorder["items"][$num_line_items]['options' . $j]['name'] = $order->products[$i]['attributes'][$j]['option'];
    $myorder["items"][$num_line_items]['options' . $j]['value'] = $order->products[$i]['attributes'][$j]['value'];
    }

    is what I tried commenting out and it gave me a blank white page. Apparently it looks for it elsewhere as well.

  3. #13
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: LinkPoint and Error SGS-005000

    Quote Originally Posted by tstamplis View Post
    I talked with linkpoint API today as I had another issue with an order. They confirmed it was the attributes that caused the error. Specifically, a text input field that had 240 characters in it (this is a text field used to provide layout instructions for the engraving).
    It would be more helpful if they could tell you which specific fields are allowed to have which lengths, as it relates to products and options. Their API documentation does not specify *any* restrictions whatsoever. Having the details will help determine the most correct solution to the problem.
    .

    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.

  4. #14
    Join Date
    Aug 2006
    Posts
    231
    Plugin Contributions
    0

    Default Re: LinkPoint and Error SGS-005000

    Quote Originally Posted by DrByte View Post
    It would be more helpful if they could tell you which specific fields are allowed to have which lengths, as it relates to products and options. Their API documentation does not specify *any* restrictions whatsoever. Having the details will help determine the most correct solution to the problem.
    Yeah they could be more helpful...

    But, in the first post of this thread, I posted a definition of the error message which said that <item><description. field wasn't supposed to be more than 120 characters long.

    And it has been verified that the Attributes are being counted towards that field. It would appear that the solution would be to NOT send Linkpoint the Attribute Information. We only send Name and Value anyways, not any addition information such as its individual costs, that is totaled into the full price.

    What we are looking for is a way to NOT send those attributes to Linkpoint. We already know that if we can remove those Attributes from what is sent. Even if it is just replacing the list of Attributes with something that says Attributes Present instead of listing all of them (so that we know that they purchased something with Attributes when looking at the CC log for Linkpoint.

    I just want to be able to offer multiple attributes without it causing every transaction containing them to fail.

  5. #15
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: LinkPoint and Error SGS-005000

    This is the part that's building attributes:
    Code:
          if (isset($order->products[$i]['attributes'])) {
            for ($j=0, $m=sizeof($order->products[$i]['attributes']); $j<$m; $j++) {
              $myorder["items"][$num_line_items]['options' . $j]['name'] = $order->products[$i]['attributes'][$j]['option'];
              $myorder["items"][$num_line_items]['options' . $j]['value'] = $order->products[$i]['attributes'][$j]['value'];
            }
          }
    If you put /* and */ around that block of code, it should stop sending any attrib details.

    You mentioned that you tried that and got a blank page ... which suggests that you caused some sort of other problem in the file by doing so. Are you sure you didn't leave any blank lines at the end of the file?
    Try step 2a from this article to help find the bug causing your blank page: https://www.zen-cart.com/tutorials/index.php?article=82
    .

    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.

  6. #16
    Join Date
    Oct 2006
    Posts
    62
    Plugin Contributions
    0

    Default Re: LinkPoint and Error SGS-005000

    Quote Originally Posted by DrByte View Post
    It would be more helpful if they could tell you which specific fields are allowed to have which lengths, as it relates to products and options. Their API documentation does not specify *any* restrictions whatsoever. Having the details will help determine the most correct solution to the problem.
    They told me the limit was 128 characters. The specific order I called about had 240 characters in one of the attributes values and that was what caused the error. This was from a text input box attribute for describing layout instructions for engraving.

    I have a feeling this is a new limit from them as I have never had this problem before and I have used 255 character text input boxes. I am going to try to use your fix noted in this thread and will report back how it goes.

    Thank you for your help, it is greatly appreciated!

  7. #17
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: LinkPoint and Error SGS-005000

    You said:
    Quote Originally Posted by Rasyr View Post
    items = Array
    (
    [1] => Array
    (
    [id] => 184:722d000d4aa3b69cc6a01b83ec227853
    [description] => HARP Combat Cards PDF
    [quantity] => 1
    [price] => 5.00
    [options0] => Array
    (
    [name] => Download 1
    [value] => PDF
    )

    )

    [2] => Array
    (
    [id] => 384:dca3197a19d64c2e93d1467573da9e4c
    [description] => HARP VP 2
    [quantity] => 1
    [price] => 86.10
    [options0] => Array
    (
    [name] => With Bundled
    [value] => PDF
    )

    [options1] => Array
    (
    [name] => With Bundled
    [value] => PDF2
    )

    [options2] => Array
    (
    [name] => With Bundled
    [value] => PDF3
    )

    [options3] => Array
    (
    [name] => With Bundled
    [value] => PDF4
    )

    )

    [3] => Array
    (
    [id] => 182:f5b9cdbd8bb9608c6dad80b55bbf2987
    [description] => HARP Gamemaster Screen
    [quantity] => 1
    [price] => 22.00
    [options0] => Array
    (
    [name] => With Bundled
    [value] => PDF
    )

    )

    [4] => Array
    (
    [id] => 181:a6d84afbf7f94c38446c7fc11eae6de3
    [description] => The Codex PDF
    [quantity] => 1
    [price] => 8.00
    [options0] => Array
    (
    [name] => Download 1
    [value] => PDF
    )

    )

    )
    But, none of any of those fields is greater than 128 characters.
    So, I still don't have a "correct" solution for you.

    You can try the option I posted earlier to avoid sending any attribute info at all.
    .

    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.

  8. #18
    Join Date
    Oct 2006
    Posts
    62
    Plugin Contributions
    0

    Default Re: LinkPoint and Error SGS-005000

    Quote Originally Posted by DrByte View Post
    You said:

    But, none of any of those fields is greater than 128 characters.
    So, I still don't have a "correct" solution for you.

    You can try the option I posted earlier to avoid sending any attribute info at all.
    I wondered about that too, as I didn't notice anything long in that string. Is the text in your linkpoint cc review (admin/customers/linkpont cc review) for that order the same as well?

  9. #19
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: LinkPoint and Error SGS-005000

    "the text in your linkpoint cc review" ??? I'm not sure I understand what you're asking about?
    .

    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.

  10. #20
    Join Date
    Oct 2006
    Posts
    62
    Plugin Contributions
    0

    Default Re: LinkPoint and Error SGS-005000

    Quote Originally Posted by DrByte View Post
    "the text in your linkpoint cc review" ??? I'm not sure I understand what you're asking about?
    I was asking Rasyr that question. The text he posted that you quoted saying there are no fields greater than 120 characters came from his debug log. The information I used when calling Linkpoint was not from the log but from the text in the linkpoint cc review section in admin.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Linkpoint / Yourpay Error - SGS-020002: SSL Error Reading Data.
    By greatwhitebuffalo in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 21 Jun 2011, 06:06 PM
  2. [Done v1.3.9h] SGS-002301 Linkpoint error in 1.3.9g
    By Jeff_Mash in forum Bug Reports
    Replies: 9
    Last Post: 24 Oct 2010, 11:39 PM
  3. Linkpoint Error -- SGS-020003: Invalid XML
    By Rasyr in forum Built-in Shipping and Payment Modules
    Replies: 23
    Last Post: 31 Aug 2010, 12:59 PM
  4. [Done v1.3.9] Linkpoint API Error SGS-002301
    By pinkchalkstudio in forum Bug Reports
    Replies: 10
    Last Post: 18 Sep 2008, 07:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg