Results 1 to 10 of 821

Hybrid View

  1. #1
    Join Date
    Nov 2018
    Location
    Montreal
    Posts
    6
    Plugin Contributions
    0

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

    I have found a potential store user problem with this plug-in. It is not so much a bug but rather an issue that could cause financial problems for shop owners and unsatisfied customers.

    This is the scenario, you let customers shop in multiple currencies but Square only takes payments in the currency in the country that the shop is based. We are in Canada but our store is set to a default currency of USD. If a Canadian customer checks out and their cart is set to USD their CC will be billed in CAD at about 30% more then their cart total. There is no warning from Square (or rather this plug-in) that they are going to do a currency conversion. See the potential problem?

    I've been trying for a long time to create something I'm calling a clarity message that would appear at check-out, something like;

    Square checkout only processes payments in (your square's currency), your order total is (your order total in some other currency), your CC will be billed (your order currency converted to your square's currency).

    I had it working and nice looking from the user side; it would show the clear we will be charging your CC something else (if that was the case) or a generic "Secure check out with Square Payments" type message if no conversion was required.

    I did this by using simon1066's post #126 to add an image, where he wrote:

    Here's one way to add an image:
    ,and the logic from DrByte's post # 232 where he wrote

    if ($order->info['currency'] != $location->currency) {
    Problems where two fold, where I needed to insert the "if" logic into the code to get the payment title it caused errors on the admin side in modules payments menu and in places other than checkout the message would appear sort of like "your payment will be (nothing printed here) $."

    I now have a static work around without amounts that look like this;

    Click image for larger version. 

Name:	static not so clear message.png 
Views:	97 
Size:	21.5 KB 
ID:	18145

    but, it does not appear correctly on the admin / customer orders pages or the order confirmation emailed to users. And, I don't think the message without amounts it is clear enough for some people.

    Any ideas?

  2. #2
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

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

    Fresh install 155f
    PHP: 7.1.24
    Square Payment Module 0.95
    One Page Checkout (OPC) 2.0.5

    Dr. Bytes,
    OPC turned on
    Category set up as Document - General called Printable Brochure
    Product enabled under it called Document - Product which I have the pdf & zip of the brochure to download
    When clicking confirm to order when logged in to download pdf/zip the cursor just spins and does not complete the order
    Also using guest check out the cursor just spin and does not complete the order

    OPC turned off
    I can successfully purchase the downloadable brochure pdf/zip sucessfully.

    This is the error console below.

    Attachment 18146

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

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

    Note that the jQuery issue that @haredo describes occurs when the cart contains only unpriced items, e.g. the demo product A Free Product - All (index.php?main_page=product_info&cPath=24&products_id=57), i.e. the payment method for the order is set to FreeOrder/freecharger.

    This is similar in nature to the issue that was previously corrected when PayPal Express Checkout/Shortcut-Button was selected.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

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

    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.

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    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 ...

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    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.

  7. #7
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    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,

 

 

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