Page 54 of 80 FirstFirst ... 444525354555664 ... LastLast
Results 531 to 540 of 791
  1. #531
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,174
    Plugin Contributions
    58

    Default Re: Square WebPay support thread.

    Quote Originally Posted by carlwhat View Post
    m,
    we have an order, 10030690, and we are trying to get the details of that order.
    Yes, like
    index.php?cmd=orders&page=1&oID=10030686&action=edit

    for example.
    Quote Originally Posted by carlwhat View Post
    was that order processed using square_webPay or the old square version? do you know?
    Same version, same files, same store etc.... Only difference is different merchant.
    Quote Originally Posted by carlwhat View Post
    what is the date of the order?
    All Square orders prior to switching the merchant information for Square.

    Quote Originally Posted by carlwhat View Post
    when you say, reinstalled and configured, is the configuration new from the time the order was originally placed?
    Yes

    Quote Originally Posted by carlwhat View Post
    is this problem just occurring for this order or for all orders?
    All Square orders prior to switching the merchant information for Square.

    Quote Originally Posted by carlwhat View Post
    just before line 113 which has the getOrders call you can add:

    PHP Code:
    if (is_array($response['results'])) {
                        
    trigger_error(json_encode($response['results']));
                        return new 
    Models\Order;
                    } 
    and then post the results of the corresponding log file. and we can take a look at what is happening.

    best.
    913

    [05-Oct-2023 21:34:50 America/New_York] Request URI: /admin/index.php?cmd=orders&page=1&oID=10030690&action=edit, IP address: 000.000.000.000
    --> PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Square\Models\Order::__construct(), 0 passed in /home/xxx/public_html/includes/modules/payment/square_webPay.php on line 915 and exactly 1 expected in /home/xxx/public_html/includes/modules/payment/square_webPay/square/square/src/Models/Order.php:172
    Stack trace:
    #0 /home/xxx/public_html/includes/modules/payment/square_webPay.php(915): Square\Models\Order->__construct()
    #1 /home/xxx/public_html/includes/modules/payment/square_webPay.php(526): square_webPay->lookupOrderDetails(10030690)
    #2 /home/xxx/public_html/admin/orders.php(741): square_webPay->admin_notification(10030690)
    #3 /home/xxx/public_html/admin/index.php(11): require('/home/xxx/...')
    #4 {main}
    thrown in /home/xxx/public_html/includes/modules/payment/square_webPay/square/square/src/Models/Order.php on line 172.

    Thanks =)
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  2. #532
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,819
    Plugin Contributions
    9

    Default Re: Square WebPay support thread.

    ok. you have new credentials. and you are trying to get the details of an order that made use of previous credentials. that is the problem you are experiencing.

    i would like to point out that i do not use square (nor do any of the few clients i have); and i only decided to code this module at the request of one of the admins.

    i tried to follow the path of the previous square module, and really i never liked the idea of making an API call every time someone is looking at an order in the admin. it is a waste of bandwidth IMO, and totally unnecessary. if one looks at my authorize.net card on file module, i only make API calls when needed, ie when refunded or doing an add-on transaction, etc.

    for those of you that are experiencing this error, here is the solution. script:

    includes/modules/payment/square_webPay.php

    lines 912 -913 on version 1.0.4

    PHP Code:
    //from
                    
    $response $this->processResult($apiResponse$request);
                    return 
    $response['results']->getOrders(); 

    //to
                    
    $response $this->processResult($apiResponse$request);
                    if (
    $response['errors']) {
                        return [];
                    }
                    return 
    $response['results']->getOrders(); 
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  3. #533
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,174
    Plugin Contributions
    58

    Default Re: Square WebPay support thread.

    Quote Originally Posted by carlwhat View Post
    ok. you have new credentials. and you are trying to get the details of an order that made use of previous credentials. that is the problem you are experiencing.

    i would like to point out that i do not use square (nor do any of the few clients i have); and i only decided to code this module at the request of one of the admins.

    i tried to follow the path of the previous square module, and really i never liked the idea of making an API call every time someone is looking at an order in the admin. it is a waste of bandwidth IMO, and totally unnecessary. if one looks at my authorize.net card on file module, i only make API calls when needed, ie when refunded or doing an add-on transaction, etc.

    for those of you that are experiencing this error, here is the solution. script:

    includes/modules/payment/square_webPay.php

    lines 912 -913 on version 1.0.4

    PHP Code:
    //from
                    
    $response $this->processResult($apiResponse$request);
                    return 
    $response['results']->getOrders(); 

    //to
                    
    $response $this->processResult($apiResponse$request);
                    if (
    $response['errors']) {
                        return [];
                    }
                    return 
    $response['results']->getOrders(); 
    It doesn't work for me.

    Here is what I have
    Code:
                $request = new Models\BatchRetrieveOrdersRequest($ids);
    
                try {
                    $apiResponse = $this->client->getOrdersApi()->batchRetrieveOrders($request);
    //orders fix (https://www.zen-cart.com/showthread.php?228750-Square-WebPay-support-thread&p=1397245#post1397245)
                    //$response = $this->processResult($apiResponse, $request);
                    //return $response['results']->getOrders(); 
                    $response = $this->processResult($apiResponse, $request);
                    if ($response['errors']) {
                        return [];
                    }
                    return $response['results']->getOrders(); 
                } catch (\SquareConnect\ApiException $e) {
                    return new Models\Order;
                }
            }
    Here is the error

    [06-Oct-2023 10:10:23 America/New_York] Request URI: /XX/index.php?cmd=orders&page=1&oID=10030684&action=edit, IP address: 000.000.000.000
    --> PHP Fatal error: Uncaught Error: Call to a member function getOrders() on array in /home/XXX/public_html/includes/modules/payment/square_webPay.php:919
    Stack trace:
    #0 /home/XXX/public_html/includes/modules/payment/square_webPay.php(526): square_webPay->lookupOrderDetails(10030684)
    #1 /home/XXX/public_html/XX/orders.php(741): square_webPay->admin_notification(10030684)
    #2 /home/XXX/public_html/XX/index.php(11): require('/home/XXX/...')
    #3 {main}
    thrown in /home/XXX/public_html/includes/modules/payment/square_webPay.php on line 919.
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  4. #534
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,819
    Plugin Contributions
    9

    Default Re: Square WebPay support thread.

    before the getOrders, aka, the error line, add

    PHP Code:
    trigger_error('Response: ' json_encode($response)); 
    and post that log.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  5. #535
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,174
    Plugin Contributions
    58

    Default Re: Square WebPay support thread.

    Quote Originally Posted by carlwhat View Post
    before the getOrders, aka, the error line, add

    PHP Code:
    trigger_error('Response: ' json_encode($response)); 
    and post that log.

    [06-Oct-2023 10:32:26 America/New_York] Request URI: /xxx/index.php?cmd=orders&page=1&oID=10030689&action=edit, IP address: 134.215.175.155
    --> PHP Fatal error: Uncaught Error: Call to a member function getOrders() on array in /home/xxx/public_html/includes/modules/payment/square_webPay.php:920
    Stack trace:
    #0 /home/xxx/public_html/includes/modules/payment/square_webPay.php(526): square_webPay->lookupOrderDetails(10030689)
    #1 /home/xxx/public_html/xxx/orders.php(741): square_webPay->admin_notification(10030689)
    #2 /home/xxx/public_html/xxx/index.php(11): require('/home/xxx/...')
    #3 {main}
    thrown in /home/xxx/public_html/includes/modules/payment/square_webPay.php on line 920.
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  6. #536
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,819
    Plugin Contributions
    9

    Default Re: Square WebPay support thread.

    you are not posting the contents of:

    trigger_error('Response: ' . json_encode($response));

    i need a log file that starts with:

    Response:

    if you want more help.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #537
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,174
    Plugin Contributions
    58

    Default Re: Square WebPay support thread.

    Quote Originally Posted by carlwhat View Post
    you are not posting the contents of:

    trigger_error('Response: ' . json_encode($response));

    i need a log file that starts with:

    Response:

    if you want more help.
    One was not generated
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  8. #538
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,819
    Plugin Contributions
    9

    Default Re: Square WebPay support thread.

    try:

    PHP Code:
    trigger_error('Response: ' json_encode($response), E_USER_WARNING); 
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  9. #539
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,174
    Plugin Contributions
    58

    Default Re: Square WebPay support thread.

    Quote Originally Posted by carlwhat View Post
    try:

    PHP Code:
    trigger_error('Response: ' json_encode($response), E_USER_WARNING); 

    [09-Oct-2023 06:03:08 America/New_York] Request URI: /XX/index.php?cmd=orders&page=1&oID=10030681&action=edit, IP address: 000.000.000.000
    #1 trigger_error() called at [/home/XXX/public_html/includes/modules/payment/square_webPay.php:919]
    #2 square_webPay->lookupOrderDetails() called at [/home/XXX/public_html/includes/modules/payment/square_webPay.php:526]
    #3 square_webPay->admin_notification() called at [/home/XXX/public_html/XX/orders.php:741]
    #4 require(/home/XXX/public_html/XX/orders.php) called at [/home/XXX/public_html/XX/index.php:11]
    --> PHP Warning: Response: {"error":true,"results":[{"category":"AUTHENTICATION_ERROR","code":"FORBIDDEN","detail":"Cannot fetch orders for a different merchant."}]} in /home/XXX/public_html/includes/modules/payment/square_webPay.php on line 919.


    [09-Oct-2023 06:03:08 America/New_York] Request URI: /XX/index.php?cmd=orders&page=1&oID=10030681&action=edit, IP address: 000.000.000.000
    --> PHP Fatal error: Uncaught Error: Call to a member function getOrders() on array in /home/XXX/public_html/includes/modules/payment/square_webPay.php:920
    Stack trace:
    #0 /home/XXX/public_html/includes/modules/payment/square_webPay.php(526): square_webPay->lookupOrderDetails(10030681)
    #1 /home/XXX/public_html/XX/orders.php(741): square_webPay->admin_notification(10030681)
    #2 /home/XXX/public_html/XX/index.php(11): require('/home/XXX/...')
    #3 {main}
    thrown in /home/XXX/public_html/includes/modules/payment/square_webPay.php on line 920.
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  10. #540
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,819
    Plugin Contributions
    9

    Default Re: Square WebPay support thread.

    look back at this post.

    PHP Code:
    //from
    if ($response['errors']) {
    //to
    if ($response['error']) { 
    TSIS.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 
Page 54 of 80 FirstFirst ... 444525354555664 ... LastLast

Similar Threads

  1. Square Payment Module for Zen Cart [Support Thread]
    By DrByte in forum Addon Payment Modules
    Replies: 765
    Last Post: 14 Feb 2025, 03:57 PM
  2. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  3. Square Support for SqPaymentForm ending 15th July 2022
    By brittainmark in forum Addon Payment Modules
    Replies: 1
    Last Post: 9 Apr 2022, 02:40 PM
  4. v156 Square Payments and strange request from Square
    By ianhg in forum General Questions
    Replies: 4
    Last Post: 14 Nov 2020, 11:14 AM
  5. v156 PWA, Offline support Push notifications addon [Support Thread]
    By perfumbg in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 May 2019, 02:27 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