Results 1 to 10 of 821

Threaded View

  1. #11
    Join Date
    Mar 2016
    Location
    Norcatur, Kansas, USA
    Posts
    80
    Plugin Contributions
    3

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

    Quote Originally Posted by DrByte View Post
    Um ... The error suggests that you've changed the PHP files associated with this module. If it was something Square did only on their end, the error would be different.

    What's the back-story of changes to the PHP files?

    Which set of files are you using? v0.9xxx? or 1.0-beta? Or a hybrid of files that you've changed independently?
    Ah, you are correct. I modified modules\payment\square.php around line 318 to add extra information about the order to the description passed to square:

    Code:
    	if (sizeof($order->products) < 100) {
    	    $p = '';
                for ($i = 0; $i < sizeof($order->products); $i++) {
                    $p2 = $order->products[$i];
    				if (!$p == '') {
    					$p .= ', ';
    				}
    				$p .= '(' . $p2['qty'] . ') ' . $p2['name'] ;
                }
            }
    		$p = 'Item(s) Ordered:' . $p;
    		
    		$d = 'Delivery Address: ' . $order->delivery['street_address'] . ', ' . $order->delivery['city'] . ', ' . $order->delivery['state'] . '  ' . $order->delivery['postcode'] . '  tel:' . $order->customer['telephone'];
    		$p .= '; ' . $d;
    
            $note = htmlentities(trim($order->billing['firstname'] . ' ' . $order->billing['lastname'] . ' ' . $p . ' ' . STORE_NAME));
    I had done this for the Stripe module and it worked great there because it basically duplicated the order information on the email that Stripe sent out to customers, which helped reassure them. The average order at my store is $3.5k, and some people are apprehensive about making such big purchases on the internet.

    I recently switched from Stripe to Square, and that is the reason for the module change. I will go read up how long the note field can be and modify the code to fit.

    Edit: So I reverted the payment module files back to the 1.0-beta (which is the version I'm using) and I still have the OAuthApi.php line 134 error.
    Last edited by Fjolsvith; 5 Mar 2020 at 03:54 AM.

 

 

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