Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    3
    Plugin Contributions
    1

    Default [Done v1.3.7] Possible Linkpoint Bug?

    I'm not sure if this is the right forum for this, or even if this is a bug, or if it's been posted before (I didn't find it in a search) so please move/delete as you see fit.

    In any case, I was trying to install linkpoint for a customer, and I kept getting the 'card declined' error. I checked the db table and saw that I was getting the 'Invalid XML' message. After trying to fix it on my own, I called linkpoint tech support (very helpful), and they told me it was likely trying to send an invalid character.

    Again, looking through the submitted fields in the DB, I saw that the ip field had a box in it, not an ip address. I asked tech support if that was a necessary field, they said no, so I went into the linkpoint api code and removed the references to it. The next transaction I tried went right through.

    Now, I had set up the API for another client the week previous, and not had this issue - same host and everything - the only difference being that one was using SSL and one is not (as of yet, I'm trying to get them to get the cert).

    The field in question is set by $_SERVER['REMOTE_ADDR'] - I don't know enough about SSL to know if that would prevent it from getting the address (I would imagine it would), but in any case since LP is part of the release now I thought you might like to know about the issue I had, and also if anyone else has and searches for LP that they might find this info.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Possible Linkpoint Bug

    You might try adding this to your /init_includes/init_sanitize.php file:

    Code:
    /**
     * sanitize $_SERVER vars
     */
      $_SERVER['REMOTE_ADDR'] = preg_replace('/[^0-9.%]/', '', $_SESSION['REMOTE_ADDR']);
    This will strip all non-numeric characters from the IP address. If there are no characters left, then there should be no error.
    .

    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.

  3. #3
    Join Date
    Aug 2005
    Location
    Cincinnati
    Posts
    334
    Plugin Contributions
    0

    help question Re: Possible Linkpoint Bug

    Running ZC 1.3.7 and the LinkPoint module doesn't connect if there is a special character anywhere in the packet. I added the code Doc suggested, put my amended init_sanitize.php in the overrides folder, and my next test threw this error:
    Warning: strstr(): Empty delimiter. in /hsphere/local/home/sksadmin/shedkitstore.com/includes/modules/payment/linkpoint_api.php on line 86
    I looked again at the file and discovered the code already exists at line 90. Doesn't seem to be doing much good, though, as orders fail whenever there is a special character in the billing address. After deleting the file from the overrides folder, I replaced the special character using the customer's account controls, tried the transaction again, and it went through.

    This special character problem doesn't seem to affect PayPal IPN, but it blows YourPay orders every time. How does everyone else deal with it? Require customers to change their names or addresses?

    Quote Originally Posted by DrByte View Post
    You might try adding this to your /init_includes/init_sanitize.php file:

    Code:
    /**
     * sanitize $_SERVER vars
     */
      $_SERVER['REMOTE_ADDR'] = preg_replace('/[^0-9.%]/', '', $_SESSION['REMOTE_ADDR']);
    This will strip all non-numeric characters from the IP address. If there are no characters left, then there should be no error.

 

 

Similar Threads

  1. Replies: 102
    Last Post: 1 Jun 2017, 09:29 AM
  2. Replies: 1
    Last Post: 28 Sep 2010, 09:24 PM
  3. Replies: 5
    Last Post: 6 Apr 2008, 01:57 AM
  4. [Done v1.3.9] Linkpoint bug?
    By yellow1912 in forum Bug Reports
    Replies: 3
    Last Post: 19 Jan 2008, 07:42 PM
  5. Replies: 0
    Last Post: 10 Jul 2007, 08:28 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR