Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    93
    Plugin Contributions
    0

    Default Bridgeway Pay/GPS Payment module

    Our bank recently transferred us to using Bridgeway Pay as our payment gateway and Bridgeway has their own Zen Cart payment module plugin. It seems we are able to process transactions successfully but I've received several debug logs with the following error:

    Code:
     PHP Warning:  Creating default object from empty value in /xxx/catalog/includes/modules/payment/gps.php on line 627
    Lines 624-630 of the reference file contain this function:
    Code:
      function admin_notification($zf_order_id) {
        global $db;
        $output = '';
        $aimdata->fields = array();
        require(DIR_FS_CATALOG . DIR_WS_LANGUAGES . 'english/modules/payment/gps_admin_notification.php');
        return $output;
      }
    Bridgeway Pay integration states that the problem lies with Zen Cart and not their plugin. Any insight into what the problem is and what the possible solution is would be appreciated.

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

    Default Re: Bridgeway Pay/GPS Payment module

    The error message is very similar to errors that happen when the site is using a newer version of PHP than what the module was designed for.

    Judging from the code you posted, they've built a clone of the Authorize.net module. And in recent versions of Zen Cart that segment of code was updated for compatibility with newer PHP versions. So their module should also get updated.
    The change to deal with that isolated error is shown on line 494 as highlighted here: https://github.com/zencart/zencart/b...t_aim.php#L494

    There might be other changes they should make too.

    But, the problem is indeed in their plugin module, and not in Zen Cart itself.
    .

    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
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    93
    Plugin Contributions
    0

    Default Re: Bridgeway Pay/GPS Payment module

    Thank you! I believe you are correct, their system is set up to work on the Authorize.net AIM system so they probably cloned that payment module. I made the correction you provided and notified them of the need to update their plugin.

  4. #4
    Join Date
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    93
    Plugin Contributions
    0

    Default Re: Bridgeway Pay/GPS Payment module

    You were so helpful last time, maybe you can help me with this one. I received this debug log this morning:

    Code:
    [29-Jun-2016 18:08:17 America/New_York] PHP Fatal error:  Uncaught  exception 'Exception' with message 'String could not be parsed as XML'  in /usr/www/users/xxx/catalog/includes/modules/payment/gps.php:298
    Stack trace:
    #0 /usr/www/users/xxx/catalog/includes/modules/payment/gps.php(298): SimpleXMLElement->__construct('')
    #1 /usr/www/users/xxx/catalog/includes/modules/payment/gps.php(150): gps->get_post_url()
    #2 /usr/www/users/xxx/catalog//includes/classes/payment.php(146): gps->javascript_validation()
    #3 /usr/www/users/xxx/catalog/includes/templates/exodus/templates/tpl_checkout_payment_default.php(15):  payment->javascript_validation()
    #4  /usr/www/users/xxx/catalog/includes/templates/exodus/common/tpl_main_page.php(151):  require(/usr/www/users/...')
    #5 /usr/www/users/xxx/catalog/index.php(97): require('/usr/www/users/...')
    #6 {main}
      thrown in /usr/www/users/xxx/catalog/includes/modules/payment/gps.php on line 298
    Line 298 is
    Code:
    $gwResponse = @new SimpleXMLElement($response);
    within this section
    Code:
            $xmlRequest->appendChild($xmlSale);
    
            unset($response);
            $response = $this->_makeRequest($xmlRequest);
    
            $gwResponse = @new SimpleXMLElement($response);
            if((string)$gwResponse->result == 1) {
                $formURL = $gwResponse->{'form-url'};
                $_SESSION['trans_id'] = (string)$gwResponse->{'transaction-id'};
            } else {
                print('<h2 style="color:red;">' . htmlentities((string)$gwResponse->{'result-text'}, ENT_COMPAT, "UTF-8") . ': </h2>');
                print('<h3 style="color:red;"> Please fix account information.</h3>');
            }
            return $formURL;
        }
    I've gone back and forth with Bridgeway pay and basically they tell me, this is the module they have and when they will get around to updating it is unknown. In the meantime, the bank we use insists that Bridgeway is their new payment provider so I have no choice but to try to make this work.

    I've attached the full gps.php file for you in case I didn't provide enough code above. Any and all assistance is GREATLY appreciated!
    Attachment 16462

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

    Default Re: Bridgeway Pay/GPS Payment module

    To figure out why "can't be parsed as XML" you'll need to find out what's in $response and probably also in $xmlRequest, probably by doing some logging. I suspect something's encountering incoming data in a bad format but then doesn't fix it before trying to transmit the bad data.
    .

    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. #6
    Join Date
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    93
    Plugin Contributions
    0

    Default Re: Bridgeway Pay/GPS Payment module

    As we've processed plenty of payments without this error previously, I wonder if it's possible that a customer was a bad typist and used some strange character in their name or address and that threw the error. I've informed Bridgeway as I don't know if I'm competent enough to set up the logging to gather the data on my own. Thanks for the insight Dr. Byte!

  7. #7
    Join Date
    Dec 2006
    Location
    Hudson Valley, New York USA
    Posts
    93
    Plugin Contributions
    0

    Default Re: Bridgeway Pay/GPS Payment module

    Here's another one:
    Code:
    PHP Warning:  DOMElement::__construct(): unterminated entity reference Mark in /usr/www/users/xxx/xxx/catalog/includes/modules/payment/gps.php on line 229
    The referenced line is within this function:
    Code:
    function appendXmlNode($parent, $name, $value) {
              unset($tmp);
              $tmp = new DOMElement($name, $value);
              $parent->appendChild($tmp);
        }

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,683
    Plugin Contributions
    123

    Default Re: Bridgeway Pay/GPS Payment module

    I just posted an update to the GPS integration.

    https://www.zen-cart.com/downloads.php?do=file&id=2265
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Session Issues - pay station payment module
    By xplosiv in forum Addon Payment Modules
    Replies: 7
    Last Post: 11 Nov 2014, 04:47 AM
  2. Looking for payment module selection pay by phone
    By pixelfix in forum Addon Payment Modules
    Replies: 5
    Last Post: 7 Oct 2011, 05:16 AM
  3. Quick fix for Plug n Pay payment module
    By x-tremeentertainment in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 12 Jul 2006, 12:23 AM

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