Page 33 of 75 FirstFirst ... 23313233343543 ... LastLast
Results 321 to 330 of 750
  1. #321
    Join Date
    Nov 2006
    Posts
    108
    Plugin Contributions
    0

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

    Great work on the Square module! Thank you!

    When Square is updating their API (which they did quite often in 2019), can I usually update without worrying or is there a good chance that the Zen Cart module will not work anymore?

  2. #322
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

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

    Quote Originally Posted by DrByte View Post
    The customer's name is transmitted with the payment, but Square doesn't display it in their dashboard.

    I think getting it to display requires injecting your customer into your Square account whenever a sale is made, then linking an order to that customer, and then linking the payment to that customer+order. That's gonna require a notable reworking of the Square module. It's on the radar but no date has been set for working on that yet.

    I'm prepping for an update that improves other underlying components to be compatible with Square's latest updates. This update will also increase some of the data transmitted, but I don't expect it will fix the "Unknown" label you mentioned.
    Would it be possible to display a field in the form instead? that way we store owners could also verify that information when processing the order. We had some quite serious problems in the past 2 years where a few of our customers were using their spouses/ex-spouses/boyfriends credit cards without their authorization (or so the credit card owners claimed) to place orders on our website, which we had to refund as they ended up being unauthorized. We lost the products and the funds, so not cool. Having a field in the form to verify the name on the card would at least provide a certain level of security for merchants (somewhat).

    I looked into the square developer and I found (not that I even pretend to know anything about it) a the cardholder_name parameter https://developer.squareup.com/refer...-customer-card
    Could this be incorporated?

    Thank you for all you do, and for looking into this.

  3. #323
    Join Date
    Jan 2010
    Posts
    48
    Plugin Contributions
    0

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

    ZC 1.5.5f
    PHP 7.1.33
    MySQL 5.7.23-23
    Square 0.97

    I've got a cron job that runs on odd numbered days to refresh OAuth. It's been running quietly for months. A bit over a week ago, it's been triggering the following error:
    Code:
    [19-Dec-2019 00:00:02 America/Los_Angeles] PHP Fatal error:  Uncaught Error: Class 'square' not found in /*****/********/public_html/mystoredomain/square_handler.php:21
    Stack trace:
    #0 {main}
      thrown in /*****/********/public_html/mystoredomain/square_handler.php on line 21
    I've verified that the cron is running PHP 7.1.33.

    My host changed how they serve up PHP on December 17 that bumped the PHP version my cart used to 7.3, which triggered numerous errors/warnings. I went into the control panel and backed PHP down to 7.1.33. I've been getting the cron triggered errors since then.

    I haven't done any significant changes to the cart in this time frame. Square payments are being processed normally.

    I would appreciate any thoughts and suggestions on how to fix this.

  4. #324
    Join Date
    Jan 2010
    Posts
    48
    Plugin Contributions
    0

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

    I've tracked down the reason that the cron job triggers the error reported in my last post.

    It appears that with the latest host changes that $PHP_SELF and (most?) $_SERVER variables are empty when the script is run from cron. The code in includes/classes/payment.php failed to find the square payment module because it extracts the script type (.php) from the $PHP_SELF variable.

    My patch to get around this problem was to set $PHP_SELF to __FILE__ if $PHP_SELF was empty in square_handler.php near line 13:
    Code:
    require 'includes/application_top.php';
    if (empty($PHP_SELF)) $PHP_SELF = __FILE__; // ensure that $PHP_SELF is not empty
    require DIR_WS_CLASSES . 'payment.php';
    All seems well now.

  5. #325

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

    ZC 1.5.4
    PHP 5.6.40
    MySQL 5.7.28
    Square 0.97

    Hoping for some help troubleshooting
    SQ-NONCE-FAILURE. Understand it is probably in my template's tpl_checkout_payment_default.php file. I have done some coding in the past, but this is beyond my current understanding of ZC. To me, line 22 below (not numbered, sorry)
    <?php echo zen_draw_form('checkout_payment', zen_href_lin
    looks to me to fulfill the "<form> element with a name="checkout_payment" in it" requirement, but there is much I don't understand. :)

    Console errors:
    Uncaught ReferenceError: $ is not defined at index.php?main_page=checkout_payment:100Uncaught ReferenceError: $ is not defined at index.php?main_page=checkout_payment:188

    Using a Template named Cold_Steel

    Please?

    tpl_checkout_payment_default.php

    Code:
    <?php
    /**
     * Page Template
     *
     * Loaded automatically by index.php?main_page=checkout_payment.<br />
     * Displays the allowed payment modules, for selection by customer.
     *
     * @package templateSystem
     * @copyright Copyright 2003-2011 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
      **********************************************************************
     *This program is distributed in the hope that it will be useful, but
     *WITHOUT ANY WARRANTY; without even the implied warranty of
     *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    **********************************************************************
    * @version $Id: tpl_checkout_payment_default.php 19358 2011-08-24 17:36:50Z drbyte $
     */
    ?>
    <?php echo $payment_modules->javascript_validation(); ?>
    <div class="centerColumn" id="checkoutPayment">
    <?php echo zen_draw_form('checkout_payment', zen_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', ($flagOnSubmit ? 'onsubmit="return check_form();"' : '')); ?>
    <?php echo zen_draw_hidden_field('action', 'submit'); ?>
    
    
    <h1 id="checkoutPaymentHeading"><?php echo HEADING_TITLE; ?></h1>
    
    
    <!-- bof Order Steps (tableless) -->
        <div class="progressmeter">
            <?php echo TEXT_ORDER_STEPS_INFO; ?>
            <ol>
            <li class="one"><span><?php echo DONE_TEXT_ORDER_STEPS; ?></span><?php echo TEXT_ORDER_STEPS_1; ?></li>
            <li class="two current"><span><?php echo CURRENT_TEXT_ORDER_STEPS; ?></span><?php echo TEXT_ORDER_STEPS_2; ?></li>
            <li class="three"><span><?php echo NEXT_TEXT_ORDER_STEPS_3; ?></span><?php echo TEXT_ORDER_STEPS_3; ?></li>
            <li class="four"><span><?php echo NEXT_TEXT_ORDER_STEPS_4; ?></span><?php echo TEXT_ORDER_STEPS_4; ?></li>
            </ol>
        </div>
    
    
    <!-- eof Order Steps (tableless) -->
    
    
    <?php if ($messageStack->size('redemptions') > 0) echo $messageStack->output('redemptions'); ?>
    <?php if ($messageStack->size('checkout') > 0) echo $messageStack->output('checkout'); ?>
    <?php if ($messageStack->size('checkout_payment') > 0) echo $messageStack->output('checkout_payment'); ?>
    
    
    <?php
      if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
    ?>
    <fieldset>
    <legend><?php echo TABLE_HEADING_CONDITIONS; ?></legend>
    <div><?php echo TEXT_CONDITIONS_DESCRIPTION;?></div>
    <?php echo  zen_draw_checkbox_field('conditions', '1', false, 'id="conditions"');?>
    <label class="checkboxLabel" for="conditions"><?php echo TEXT_CONDITIONS_CONFIRM; ?></label>
    </fieldset>
    <?php
      }
    ?>
    
    
    <?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
          if (!$payment_modules->in_special_checkout()) {
          // ** END PAYPAL EXPRESS CHECKOUT ** ?>
    <h2 id="checkoutPaymentHeadingAddress"><?php echo TITLE_BILLING_ADDRESS; ?></h2>
    
    
    <div id="checkoutBillto" class="floatingBox back">
    <?php if (MAX_ADDRESS_BOOK_ENTRIES >= 2) { ?>
    <div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHANGE_ADDRESS, BUTTON_CHANGE_ADDRESS_ALT) . '</a>'; ?></div>
    <?php } ?>
    <address><?php echo zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, ' ', '<br />'); ?></address>
    </div>
    
    
    <div class="floatingBox important forward"><?php echo TEXT_SELECTED_BILLING_DESTINATION; ?></div>
    <br class="clearBoth" />
    <?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
          }
          // ** END PAYPAL EXPRESS CHECKOUT ** ?>
    
    
    <fieldset id="checkoutOrderTotals">
    <legend id="checkoutPaymentHeadingTotal"><?php echo TEXT_YOUR_TOTAL; ?></legend>
    <?php
      if (MODULE_ORDER_TOTAL_INSTALLED) {
        $order_totals = $order_total_modules->process();
    ?>
    <?php $order_total_modules->output(); ?>
    <?php
      }
    ?>
    </fieldset>
    
    
    <?php
      $selection =  $order_total_modules->credit_selection();
      if (sizeof($selection)>0) {
        for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
          if ($_GET['credit_class_error_code'] == $selection[$i]['id']) {
    ?>
    <div class="messageStackError"><?php echo zen_output_string_protected($_GET['credit_class_error']); ?></div>
    
    
    <?php
          }
          for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
    ?>
    <fieldset>
    <legend><?php echo $selection[$i]['module']; ?></legend>
    <?php echo $selection[$i]['redeem_instructions']; ?>
    <div class="gvBal larger"><?php echo $selection[$i]['checkbox']; ?></div>
    <label class="inputLabel"<?php echo ($selection[$i]['fields'][$j]['tag']) ? ' for="'.$selection[$i]['fields'][$j]['tag'].'"': ''; ?>><?php echo $selection[$i]['fields'][$j]['title']; ?></label>
    <?php echo $selection[$i]['fields'][$j]['field']; ?>
    </fieldset>
    <?php
          }
        }
    ?>
    
    
    <?php
        }
    ?>
    
    
    <?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
          if (!$payment_modules->in_special_checkout()) {
          // ** END PAYPAL EXPRESS CHECKOUT ** ?>
    <fieldset>
    <legend><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></legend>
    
    
    <?php
      if (SHOW_ACCEPTED_CREDIT_CARDS != '0') {
    ?>
    
    
    <?php
        if (SHOW_ACCEPTED_CREDIT_CARDS == '1') {
          echo TEXT_ACCEPTED_CREDIT_CARDS . zen_get_cc_enabled();
        }
        if (SHOW_ACCEPTED_CREDIT_CARDS == '2') {
          echo TEXT_ACCEPTED_CREDIT_CARDS . zen_get_cc_enabled('IMAGE_');
        }
    ?>
    <br class="clearBoth" />
    <?php } ?>
    
    
    <?php
      $selection = $payment_modules->selection();
    
    
      if (sizeof($selection) > 1) {
    ?>
    <p class="important"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></p>
    <?php
      } elseif (sizeof($selection) == 0) {
    ?>
    <p class="important"><?php echo TEXT_NO_PAYMENT_OPTIONS_AVAILABLE; ?></p>
    
    
    <?php
      }
    ?>
    
    
    <?php
      $radio_buttons = 0;
      for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
    ?>
    <?php
        if (sizeof($selection) > 1) {
            if (empty($selection[$i]['noradio'])) {
     ?>
    <?php echo zen_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $_SESSION['payment'] ? true : false), 'id="pmt-'.$selection[$i]['id'].'"'); ?>
    <?php   } ?>
    <?php
        } else {
    
    
    ?>
    <?php echo zen_draw_hidden_field('payment', $selection[$i]['id'], 'id="pmt-'.$selection[$i]['id'].'"'); ?>
    <?php
        }
    ?>
    <label for="pmt-<?php echo $selection[$i]['id']; ?>" class="radioButtonLabel"><?php echo $selection[$i]['module']; ?></label>
    
    
    <?php
        if (defined('MODULE_ORDER_TOTAL_COD_STATUS') && MODULE_ORDER_TOTAL_COD_STATUS == 'true' and $selection[$i]['id'] == 'cod') {
    ?>
    <div class="alert"><?php echo TEXT_INFO_COD_FEES; ?></div>
    <?php
        } else {
          // echo 'WRONG ' . $selection[$i]['id'];
    ?>
    <?php
        }
    ?>
    <br class="clearBoth" />
    
    
    <?php
        if (isset($selection[$i]['error'])) {
    ?>
        <div><?php echo $selection[$i]['error']; ?></div>
    
    
    <?php
        } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
    ?>
    
    
    <div class="ccinfo">
    <?php
          for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
    ?>
    <label <?php echo (isset($selection[$i]['fields'][$j]['tag']) ? 'for="'.$selection[$i]['fields'][$j]['tag'] . '" ' : ''); ?>class="inputLabelPayment"><?php echo $selection[$i]['fields'][$j]['title']; ?></label><?php echo $selection[$i]['fields'][$j]['field']; ?>
    <br class="clearBoth" />
    <?php
          }
    ?>
    </div>
    <br class="clearBoth" />
    <?php
        }
        $radio_buttons++;
    ?>
    <br class="clearBoth" />
    <?php
      }
    ?>
    
    
    </fieldset>
    <?php // ** BEGIN PAYPAL EXPRESS CHECKOUT **
          } else {
            ?><input type="hidden" name="payment" value="<?php echo $_SESSION['payment']; ?>" /><?php
          }
          // ** END PAYPAL EXPRESS CHECKOUT ** ?>
    <fieldset>
    <legend><?php echo TABLE_HEADING_COMMENTS; ?></legend>
    <?php echo zen_draw_textarea_field('comments', '45', '3'); ?>
    </fieldset>
    
    
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONTINUE_CHECKOUT, BUTTON_CONTINUE_ALT, 'onclick="submitFunction('.zen_user_has_gv_account($_SESSION['customer_id']).','.$order->info['total'].')"'); ?></div>
    <div class="buttonRow back"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '<br />' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></div>
    
    
    </form>
    </div>
    Last edited by dkerfoot; 11 Jan 2020 at 02:45 PM.
    Doug Kerfoot
    KeyLlama.com

  6. #326
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

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

    The console error that you noted above:
    Code:
    Console errors:
    Uncaught ReferenceError: $ is not defined at index.php?main_page=checkout_payment:100Uncaught ReferenceError: $ is not defined at index.php?main_page=checkout_payment:188
    implies to me that your template's /common/html_header.php isn't loading jQuery (or loading a woefully old version). Make sure, too, that your template includes /jscript/jscript_framework.php (that's the AJAX support interface).

  7. #327
    Join Date
    Nov 2006
    Posts
    108
    Plugin Contributions
    0

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

    What is the postal code input in the Square module needed for? Normally postal code is not needed for payment by credit card.

  8. #328
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,106
    Plugin Contributions
    11

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

    Quote Originally Posted by todoonada View Post
    What is the postal code input in the Square module needed for? Normally postal code is not needed for payment by credit card.
    Square looks for a match between the billing zip and the zip presented in the form. Not unlike many gas stations that ask for a zip to verify the card.

    We've had several instances where corporate or charitable zip codes do not match the billing as they often confuse the zip of the holder with the zip of the institution.

    Just another way for Square to better verify the transaction.

  9. #329

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

    Quote Originally Posted by lat9 View Post
    The console error that you noted above:
    Code:
    Console errors:
    Uncaught ReferenceError: $ is not defined at index.php?main_page=checkout_payment:100Uncaught ReferenceError: $ is not defined at index.php?main_page=checkout_payment:188
    implies to me that your template's /common/html_header.php isn't loading jQuery (or loading a woefully old version). Make sure, too, that your template includes /jscript/jscript_framework.php (that's the AJAX support interface).
    Thanks! I've updated to 1.5.6c and confirmed that the standard responsive_classic template fixes the error while it remains a problem with the cold_steel template. I appreciate you taking the time to set me on the right path.

    -Doug
    Doug Kerfoot
    KeyLlama.com

  10. #330
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

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

    Quote Originally Posted by dkerfoot View Post
    Thanks! I've updated to 1.5.6c and confirmed that the standard responsive_classic template fixes the error while it remains a problem with the cold_steel template. I appreciate you taking the time to set me on the right path.

    -Doug
    Ah, yes, that cold_steel template far out-dates the introduction of the Zen Cart AJAX framework. If you want to continue using cold_steel, just copy the zc156c's responsive_classic/jscript/jscript_framework.php to cold_steel/jscript. That version of the file simply brings in the common, template_default, version of the framework.

    Note, though, that there will be a significant number of changes needed for that template to continue operation under current versions of PHP.
    Last edited by lat9; 14 Jan 2020 at 04:18 PM. Reason: Added note

 

 
Page 33 of 75 FirstFirst ... 23313233343543 ... LastLast

Similar Threads

  1. Bambora/Beanstream Payment Module Support Thread
    By swguy in forum Addon Payment Modules
    Replies: 127
    Last Post: 26 Mar 2021, 04:13 PM
  2. 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
  3. 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
  4. Layaway Payment Module Support Thread
    By Danielle in forum Addon Payment Modules
    Replies: 0
    Last Post: 21 Nov 2006, 06:43 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