Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Feb 2018
    Location
    Hilliard, Ohio
    Posts
    13
    Plugin Contributions
    0

    Default Re: Tax being calculated by TaxCloud and displayed but not collected properly by Squa

    Quote Originally Posted by TaxCloudDev View Post
    Just saw this - not sure what improper things we could be doing. We’re just an API returning the tax amount due.
    Yeah, and it does indeed work to return the proper tax amount. I absolutely love TaxCloud! The problem I'm having though is when it goes to my paments processor, the tax isn't getting sent to them properly. I wish it was just a PayPal issue, but I first noticed it with Square. So I suspect the issue lies deeper than just changing the variable names for PayPal. I'd prefer to use Square; I merely provided the PayPal logs as an example of what's going on since I don't seem to have any logs from Square. I'm afraid if I changed every instance of TAXAMT in the PHP to PAYMENTREQUEST_0_TAXAMT I'd really mess things up since I am not a PHP programmer and am not at all familiar with all the functions and calls in the various files that have to work together to make this jive.

    To reiterate:

    1a. Isn't a specific problem with PayPal, as it happens to Square payments as well (Square is where I first noticed it).

    1b. Changing the code to fix PayPal issue probably won't fix the issue with Square.

    2. Changing PHP code isn't my strong spot.

    3. I'm not 100% certain it's the TaxCloud plugin that's creating the issue. I could be a problem elsewhere (Square, PayPal, Zen Cart itself).

    I am very grateful to everyone who's trying to help!!!

  2. #12
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    Default Re: Tax being calculated by TaxCloud and displayed but not collected properly by Squa

    Use your admin's Tools->Developers Tool Kit, searching for 'AMT'.

  3. #13
    Join Date
    Feb 2018
    Location
    Hilliard, Ohio
    Posts
    13
    Plugin Contributions
    0

    Default Re: Tax being calculated by TaxCloud and displayed but not collected properly by Squa

    Quote Originally Posted by lat9 View Post
    Use your admin's Tools->Developers Tool Kit, searching for 'AMT'.
    Yes, I've done that, it yields 271 lines with that term, and probably twice as many specific instances; some are within files related to PayPal, some in Square, and some in other places. I've searched for TAXAMT, PAYMENTREQUEST_0_TAXAMT, TAX....they all return a lot of results. Not sure where to begin wading through them and seeing what's relevant and what isn't.

  4. #14
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    Default Re: Tax being calculated by TaxCloud and displayed but not collected properly by Squa

    Quote Originally Posted by sonnyjlewis View Post
    Yes, I've done that, it yields 271 lines with that term, and probably twice as many specific instances; some are within files related to PayPal, some in Square, and some in other places. I've searched for TAXAMT, PAYMENTREQUEST_0_TAXAMT, TAX....they all return a lot of results. Not sure where to begin wading through them and seeing what's relevant and what isn't.
    Did you try the search ... including those single-quotes around the value?

  5. #15
    Join Date
    Feb 2018
    Location
    Hilliard, Ohio
    Posts
    13
    Plugin Contributions
    0

    Default Re: Tax being calculated by TaxCloud and displayed but not collected properly by Squa

    Quote Originally Posted by lat9 View Post
    Did you try the search ... including those single-quotes around the value?
    YIKES! My mind didn't even register the single quotes. OK, that resulted in a much more manageable 38 instances of 'AMT' being found, all within PayPal files with the exception of a group in a TaxCloud provided file (located in /includes/modules/payment/paypalwpp.php)--see lines below.

    Code:
    Line # 962 :                                 'comments' => 'AUTHORIZATION ADDED. Trans ID: ' . urldecode($response['TRANSACTIONID']) . "\n" . ' Amount:' . urldecode($response['AMT']) . ' ' . $currency, 
    
    Line # 969 :         $messageStack->add_session(sprintf(MODULE_PAYMENT_PAYPALWPP_TEXT_AUTH_INITIATED, urldecode($response['AMT'])), 'success'); 
    
    Line #1024 :           if (!isset($response['AMT'])) $response['AMT'] = $captureAmt; 
    
    Line #1031 :                                 'comments' => 'FUNDS COLLECTED. Trans ID: ' . urldecode($response['TRANSACTIONID']) . $response['PNREF']. "\n" . ' Amount: ' . urldecode($response['AMT']) . ' ' . $currency . "\n" . 'Time: ' . urldecode($response['ORDERTIME']) . "\n" . (isset($response['RECEIPTID']) ? 'Receipt ID: ' . urldecode($response['RECEIPTID']) : 'Auth Code: ' . (isset($response['AUTHCODE']) && $response['AUTHCODE'] != '' ? $response['AUTHCODE'] : $response['CORRELATIONID'])) . (isset($response['PPREF']) ? "\nPPRef: " . $response['PPREF'] : '') . "\n" . $captureNote,
    
    Line #1038 :         $messageStack->add_session(sprintf(MODULE_PAYMENT_PAYPALWPP_TEXT_CAPT_INITIATED, urldecode($response['AMT']), urldecode($response['RECEIPTID'] . (isset($response['AUTHCODE']) && $response['AUTHCODE'] != '' ? $response['AUTHCODE'] : $response['CORRELATIONID']) ). $response['PNREF']), 'success'); 
    
    Line #1279 :            $optionsST['AMT'] = $optionsST['AMT'] + $taxCloudTax; 
    
    Line #1443 : //    $stDiffTaxOnly = (strval($sumOfLineItems - $sumOfLineTax - round($optionsST['AMT'], 2)) + 0); 
    
    Line #1495 :       /*if ($optionsST['AMT'] < $optionsST['TAXAMT']) */ $optionsST['PAYMENTREQUEST_0_TAXAMT'] = 0; 
    
    Line #1496 :       /*if ($optionsST['AMT'] < $optionsST['SHIPPINGAMT']) */ $optionsST['PAYMENTREQUEST_0_SHIPPINGAMT'] = 0; 
    
    Line #1532 :           if (strstr($key, 'AMT')) $optionsLI[$key] = round($value, ((int)$currencies->get_decimal_places($restrictedCurrency) == 0 ? 0 : 2)); 
    
    Line #1723 :          $existingAmt = $options['AMT']; 
    
    Line #1724 :          $options['AMT'] = $existingAmt + $flatRate;
    However, I feel like the issue lies deeper, quite possibly within the taxcloud module, because the Square module wouldn't have anything to do with the PayPal files, would it? And Square was where I first noticed the problem.

    Maybe I'm just totally blind and missing something? Please have patience with me.... I feel like I'm learning something, but it seems to be very slow going and I still feel as though I'm trying to write in Cyrillic while only knowing English.

    Perhaps I should offer a bounty of a free handmade journal from my website (which is one of the two sites where I'm trying to get this to work properly) to the person who solves this puzzle! The fact that it is an issue on two totally unrelated stores makes me think there's a bug somewhere....

  6. #16
    Join Date
    Feb 2018
    Location
    Hilliard, Ohio
    Posts
    13
    Plugin Contributions
    0

    Default Re: Tax being calculated by TaxCloud and displayed but not collected properly by Squa

    Welp I still haven't figured this out. Anyone else having a similar problem with 1.5.5 and having tax showing but not being collected?

  7. #17
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,690
    Plugin Contributions
    9

    Default Re: Tax being calculated by TaxCloud and displayed but not collected properly by Squa

    sonnyj,
    while i have not used square in relation to ZC or taxcloud, i'm willing to try and help.

    i'm looking at the zencart square payment. you can see the code here:

    https://github.com/zencart/zencart/b...ent/square.php

    when i look at the code, i see NOTHING as it relates to taxes. i could go on about level III data with regards to cc processing but i will not.

    again, looking at the square method, you tell it how much to collect, provide some credit card data, and it goes off and collects it. nothing to do with taxes, per se.

    on line 267, we can see the payment amount:

    Code:
    $payment_amount = $order->info['total'];
    that's the amount that square is collecting.

    now, what you are saying is that amount is wrong. as it does not include the tax. considering the modification involved with taxCloud as well as my experience with the order class, and specifically the totals contained in the $order->info; it does not surprise me that the number is wrong at the time you are trying to collect payment.

    the way i see it, you have 2 choices: you can either correct the $order->info['total'] prior to getting to the payment method; OR you can add the tax amount to the $payment_amount right here at line 267.

    do you know if the $order class has the correct tax amount stored in it in some other element? is it available?

    if everything else is correct, i would chose the 2nd case as a way to correct your problem. but it does seem that the $order->info['total'] should have the tax amount added to it, and that should be done when the data gets returned from tax cloud.

    does that make sense?

    lmk if you need more help.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  8. #18
    Join Date
    Feb 2018
    Location
    Hilliard, Ohio
    Posts
    13
    Plugin Contributions
    0

    Default Re: Tax being calculated by TaxCloud and displayed but not collected properly by Squa

    Hi Carl

    Thanks for your reply! What you say does indeed make sense, but I'm not sure about what to do in the coding of things. My mind is very simple when it comes to that. I'm able to follow the logic, but when it comes to looking at the variables, I'm getting 5 kinds of lost. One of the sites I'm having this issue with is for a Non-profit, and I'd like to get it fixed on their end before tackling my own site with the same problem. Would you be willing to take an in-depth look? If so let me know on here or PM me and we can work it out. I have to believe more people than myself are having this issue.

    Thanks!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 TaxCloud - Taxes aren't being collected post payment
    By jhowe in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 3
    Last Post: 2 Sep 2012, 01:43 AM
  2. Tax not being calculated correctly -- with tax-included pricing
    By nkrcs in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 11 Jun 2008, 07:54 PM
  3. Shipping tax not being calculated
    By honeypot in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 7
    Last Post: 11 Jan 2007, 02:22 AM
  4. Tax not being calculated
    By mazzifer in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 7 Dec 2006, 06:38 PM
  5. Weight not being calculated properly for freeshippng items going overseas
    By firehorse in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 28 Oct 2006, 05:44 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