Page 25 of 25 FirstFirst ... 15232425
Results 241 to 248 of 248
  1. #241
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,097
    Plugin Contributions
    66

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    Quote Originally Posted by lat9 View Post
    FWIW, I was able to correct the integration issue by editing the /includes/modules/pages/checkout_payment/jscript_square.php (it's also copied to the /checkout_one/jscript_square.php for the OPC integration) and changing:
    Code:
    if ($payment_modules->in_special_checkout()) {
        return false;
    }
    to
    Code:
    if ($payment_modules->in_special_checkout() || (isset($payment_modules->paymentClass) && $payment_modules->paymentClass->code != 'square')) {
        return false;
    }
    The result is that Square's jQuery module doesn't load if the payment class is selected and it's not Square.
    Please note, after additional thought, that's not going to work! The change needs to be made to the jQuery processing itself; otherwise, the payment method can't be changed to Square after a previous selection of a payment method.

    Back to the drawing board ...

  2. #242
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,097
    Plugin Contributions
    66

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    I've submitted a change-request to the Zen Cart GitHub, see this commit for details of the proposed change.

  3. #243
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,153
    Plugin Contributions
    0

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    Cindy,


    I changed:
    Code:
    Line 13: if ($payment_modules->in_special_checkout()) { replaced: if ($payment_modules->in_special_checkout() || empty($square) || !$square->enabled) {
    1. /includes/modules/pages/checkout_payment/jscript_square.php
    2. /includes/modules/pages/checkout_one/jscript_square.php

    The download worked perfectly!!!

    Mark,

  4. #244
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,097
    Plugin Contributions
    66

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    Thanks for the report, Mark. Turns out that the issue was raised when/if the Square payment method was zone-restricted as well; causing the jQuery error if the payment method was not enabled for the zone associated with the current billing address.

  5. #245
    Join Date
    Jan 2004
    Posts
    65,173
    Blog Entries
    7
    Plugin Contributions
    223

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    Quote Originally Posted by dbltoe View Post
    All of a sudden, Square is bouncing with INVALID_ENUM_VALUE with the detail - "is not a valid enum value for 'billing_address.country' "

    Is this something 0.95 might fix or do we need to come up with a country field to satisfy a new requirement.

    [27-Nov-2018 17:04:48 UTC] Request URI: /index.php?main_page=checkout_process, IP address: 72.190.125.38
    #1 trigger_error() called at [/home/spicdavi/public_html/includes/modules/payment/square.php:338]
    #2 square->before_process() called at [/home/spicdavi/public_html/includes/classes/payment.php:245]
    #3 payment->before_process() called at [/home/spicdavi/public_html/includes/modules/checkout_process.php:84]
    #4 require(/home/spicdavi/public_html/includes/modules/checkout_process.php) called at [/home/spicdavi/public_html/includes/modules/pages/checkout_process/header_php.php:14]
    #5 require(/home/spicdavi/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/home/spicdavi/public_html/index.php:36]

    [27-Nov-2018 17:04:48 UTC] PHP Notice: Square Connect [configuration] error.
    Response Body:
    stdClass Object
    (
    [errors] => Array
    (
    [0] => stdClass Object
    (
    [category] => INVALID_REQUEST_ERROR
    Code:
     => INVALID_ENUM_VALUE
    [code]
    [detail] => `` is not a valid enum value for `billing_address.country`.
    [field] => billing_address.country
    )

    )

    )

    Response Headers:
    Array
    (
    [0] => HTTP/1.1 400 Bad Request
    [Content-Type] => application/json
    [Vary] => Origin, Accept-Encoding
    [X-Content-Type-Options] => nosniff
    [X-Download-Options] => noopen
    [X-Frame-Options] => SAMEORIGIN
    [X-Permitted-Cross-Domain-Policies] => none
    [X-Xss-Protection] => 1; mode=block
    [Date] => Tue, 27 Nov 2018 17:04:47 GMT
    [keep-alive] => timeout=60
    [Strict-Transport-Security] => max-age=631152000
    [content-length] => 182
    )
    in /home/spicdavi/public_html/includes/modules/payment/square.php on line 338
    @dbltoe ... do you have any idea why the billing country is blank? It's obtained by lookup from the customer's default address, unless they change that address during checkout. The only reason I can think of why it would be blank is if they somehow were allowed to select a country which is not supported by your store, or if you've changed the "country name" or ISO codes in your Admin to something other than the default.
    .

    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. #246
    Join Date
    Dec 2018
    Location
    Alaska
    Posts
    1
    Plugin Contributions
    0

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    (Access Token needed) Still shows in red.

    Everything is set correctly.

    Everything (files) in correct location.

    Yes I refreshed admin page 1 million times (not a million, but close)

    Gots me baffled.

    All latest versions installed.

    Help, will give monatary compensation if this gets figured out.

    It is on a Dreamhost server.

  7. #247
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    6,925
    Plugin Contributions
    8

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    It's generally that you need to take special care that all of the access token is removed and the entire access token is entered. The length of the token often makes you think you got it all when you didn't.

  8. #248
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    1,689
    Plugin Contributions
    1

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    EDIT: Problem resolved

    ZC 156 builtin Square setup
    install on sandbox server with demo data
    drop tables
    import db from backup of live db
    run zc_install


    RED: Access Token needed error
    Seems that the setup is asking for input from our square account for which no field exists or I am not comprehending the field labels in setup.

    Square setup.
    Populate the fields as necessary.


    There is NO Access token field in the zc square setup but there is one in our square account

    Application ID copy/pasted from our Square account
    Application Secret (OAUTH) copy/pasted from our square account


    EDIT: It helps if you read all the setup instructions. I missed the line where zc provided a link which needed to be pasted into our Square Account

    Problem resolved.
    Last edited by RixStix; 8 Jan 2019 at 12:36 AM. Reason: added clarification
    Rick
    ChainWeavers (dot) com

 

 
Page 25 of 25 FirstFirst ... 15232425

Similar Threads

  1. WordPress® for Zen Cart® (wp4zen) [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 107
    Last Post: 13 Jan 2019, 12:32 PM
  2. Bambora/Beanstream Payment Module Support Thread
    By swguy in forum Addon Payment Modules
    Replies: 123
    Last Post: 29 Oct 2018, 02:43 AM
  3. v154 Support Thread: AddToAny for Zen Cart (The Universal Sharing Platform)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 6 Jul 2015, 11:05 PM
  4. Layaway Payment Module Support Thread
    By Danielle in forum Addon Payment Modules
    Replies: 32
    Last Post: 4 Nov 2012, 08:01 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