Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    453
    Plugin Contributions
    0

    Default Re: Square payment not working

    Thank you @carlwhat for your reply and for pointing out problems with an old, no longer used website of mine. I will update my ZenCart forum profile and remove that URL from my signature.

    I certainly did not mean to disrespect you or any of the wonderful folks who are building zencart. I have been a user of ZenCart since 2006 and have advocated for it among colleagues since then. I am very grateful for your work in creating this new Square payment module. I am using it successfully and appreciated the couple of pointers that I needed in order to get it working for my shop (https://store.hildegard.com).

    I did read through the thread on another forum that pertained to this issue but it seemed like that discussion had to do with the use of something called OPC. I don't use that and I don't even know what it stands for. Since it doesn't look like there was a resolution to that issue from July, 2022 and since the back and forth did not seem to apply to me, I will simply add some custom text to my payment page to advise customers to 1) enter their card info before a coupon code and 2) ignore any error message they see as a result of entering a coupon code.

    Thank you for all that you have done for ZenCart and I'm sorry that you took offense to my question.
    Ellie Armsby

  2. #12
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    8,957
    Plugin Contributions
    309

    Default Re: Square payment not working

    > ... had to do with the use of something called OPC. I don't use that and I don't even know what it stands for.
    One Page Checkout. It's a plugin that consolidates the three pages of checkout in a standard install.
    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.

  3. #13
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,426
    Plugin Contributions
    11

    Default Re: Square payment not working

    i accept your apology.

    i have never been a hug fan of the way coupons work on zen-cart. i have worked on them in the past; both in the core repository as well as on various client sites.

    i think the problem you are pointed out can be seen here:

    https://www.dropbox.com/s/5qnyafrk2c...upon.webm?dl=0

    which, i am in agreement is a bit misleading. customers want to put in a coupon code, and then ensure the coupon is taken prior to giving up their credit card data. that makes sense to me.

    if you find the following method, which in version v1.0.3 is on line 257, you can change the code as follows:

    PHP Code:
    //from
        
    public function pre_confirmation_check()
            {
                global 
    $messageStack;
                if (empty(
    $_REQUEST['tokenResult'])) {
                    
    trigger_error('missing token result: ' " check if card button is disabled on dev console using: document.getElementById('card-button'); else look for javascript error in console.");
                    
    $messageStack->add_session('checkout_payment'MODULE_PAYMENT_SQ_WEBPAY_TEXT_MISCONFIGURATION'error');
                    
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT'''SSL'truefalse));
                }
    //to
        
    public function pre_confirmation_check()
            {
                global 
    $messageStack;
                if (empty(
    $_REQUEST['tokenResult'])) {
                    if (empty(
    $messageStack->messages)) {
                        
    trigger_error('missing token result: ' " check if card button is disabled on dev console using: document.getElementById('card-button'); else look for javascript error in console.");
                        
    $messageStack->add_session('checkout_payment'MODULE_PAYMENT_SQ_WEBPAY_TEXT_MISCONFIGURATION'error');
                    }
                    
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT'''SSL'truefalse));
                } 
    i think your problem will go away. assuming i have it correct. you can see the results of my testing here:

    https://www.dropbox.com/s/l02ri0fp6x...ange.webm?dl=0

    note that i have only included about half of the pre_confirmation check function. the rest of the function remains the same and is required.

    hope that helps.
    mxWorks now has premium plugins
    are you using square? have you shown any appreciation with cake on venmo or on paypal?
    called the savior by the chief bottle washer...

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v156 Square Payments and strange request from Square
    By ianhg in forum General Questions
    Replies: 4
    Last Post: 14 Nov 2020, 11:14 AM
  2. Replies: 5
    Last Post: 4 Sep 2019, 05:10 PM
  3. Replies: 1
    Last Post: 2 Mar 2019, 07:12 PM
  4. v151 Toggling Category/Product Status in admin by clicking on red/green square not working
    By woodlandsprite in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 29 Oct 2012, 11:20 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