Results 1 to 10 of 821

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,915
    Plugin Contributions
    13

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

    dax,
    while i would love to blame OPC, it is not one for that forum. and sorry i missed that part!

    i have a new and simpler solution that will not break other things in the way that my previous modification of core code might.

    you said square webPay 2.0.2? assuming that is correct, here are my proposed changes:

    in this file:

    includes/modules/pages/checkout_payment/jscript_square_webPay.php

    make the following few changes:

    Code:
    // starting at line 41 from:
        $values = json_encode([
                                  'orderInfo' => $order->info,
                                  'orderBilling' => $order->billing,
                                  'orderCustomer' => $order->customer,
                                  'appId' => MODULE_PAYMENT_SQ_WEBPAY_APPLICATION_ID,
                                  'locationId' => $square_webPay->getLocationDetails()->getId(),
                                  'handler' => DIR_WS_HTTPS_CATALOG . 'squareWebPay_handler.php',
                                  'textTotal' => TEXT_YOUR_TOTAL ?? 'Total:',
                                  'orderTotal' => zen_round($order->info['total'], 2),
                                  'locale' => $locale,
                                  'google' => $google,
                                  'apple' => $applePay,
                                  'creditCards' => $creditCards,
                              ]);
    
    // to:
    
        $calculatedTotal = $order_total_modules->pre_confirmation_check(true);
        $values = json_encode([
                                  'orderInfo' => $order->info,
                                  'orderBilling' => $order->billing,
                                  'orderCustomer' => $order->customer,
                                  'appId' => MODULE_PAYMENT_SQ_WEBPAY_APPLICATION_ID,
                                  'locationId' => $square_webPay->getLocationDetails()->getId(),
                                  'handler' => DIR_WS_HTTPS_CATALOG . 'squareWebPay_handler.php',
                                  'textTotal' => TEXT_YOUR_TOTAL ?? 'Total:',
                                  'orderTotal' => zen_round($calculatedTotal, 2),
                                  'locale' => $locale,
                                  'google' => $google,
                                  'apple' => $applePay,
                                  'creditCards' => $creditCards,
                              ]);
    
    // on line 157 (now line 158... or thereabouts), from:
    
    async function verifyBuyer(payments, token) {
                const verificationDetails = {
                    amount: squareOrderValues.orderInfo.total.toFixed(2),
    
    //to: 
    async function verifyBuyer(payments, token) {
                const verificationDetails = {
                    amount: squareOrderValues.orderTotal.toFixed(2),
    all of the changes are in red.

    please let us know how that goes!

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

  2. #2
    Join Date
    Jun 2023
    Location
    UK
    Posts
    21
    Plugin Contributions
    0

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

    Hi carlwhat,

    Brilliant! That cured it. Thank you and kindest regards.

    P.S. Sorry for delay in responding but had a long weekend off...

    dax

  3. #3
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,674
    Plugin Contributions
    0

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

    Is this compatible to ZC version 2.0.0 yet?

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,697
    Plugin Contributions
    11

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

    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  5. #5
    Join Date
    Oct 2007
    Posts
    412
    Plugin Contributions
    0

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

    In Zencart admin under the Square Pay plugin it says: "Make sure the OAuth Redirect URL in your Square Account "app" is set to".

    So my question is, where in my Square Pay account do I find this "app" setting?? I can't seem to find anywhere to enter my URL.

    Click image for larger version. 

Name:	ScreenShot Tool -20250614165722.jpg 
Views:	59 
Size:	37.2 KB 
ID:	20990

  6. #6
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    334
    Plugin Contributions
    0

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

    Hi DML73
    See the OAuth section of your apps page:
    https://developer.squareup.com/apps/
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,528
    Plugin Contributions
    127

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

    Go to the OAuth tab, and paste it in the “Redirect URL” field.
    That Software Guy. My Store: Zen Cart Support
    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. WordPress® for Zen Cart® (wp4zen) [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 109
    Last Post: 1 Dec 2024, 01:36 PM
  2. Bambora/Beanstream Payment Module Support Thread
    By swguy in forum Addon Payment Modules
    Replies: 127
    Last Post: 26 Mar 2021, 04:13 PM
  3. v154 Support Thread: AddToAny for Zen Cart (The Universal Sharing Platform)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 8 Apr 2019, 02:39 PM
  4. Layaway Payment Module Support Thread
    By Danielle in forum Addon Payment Modules
    Replies: 0
    Last Post: 21 Nov 2006, 06:43 AM

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