If this is your first visit, check our documentation. To post, register or login.
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Taxes Calculated but not Collect in Payments

Taxes Calculated but not Collect in Payments

Started by sammirah on 8 Aug 2017, 10:47 AM · Views: 3,841

Results 1 to 6 of 6
8 Aug 2017, 10:47 AM
#1
sammirah avatar

sammirah

Zen Follower

Join Date:
Apr 2012
Location:
Los Angeles, CA
Posts:
185
Plugin Contributions:
2

Taxes Calculated but not Collect in Payments

I have checked the FAQ area and searched the FORUM for the issue, and while some are similar they aren't addressing my problem.

PHP Version 5.6.30 and MySQL 5.5.51-38.2

I have been using the Taxcloud module since 2014 (State Sales Tax Lookup Addon -Version: 1.5.3), I am now using (State Sales Tax Lookup Addon - Version: 1.5.4), my shipping module is USPS Version: 2016-01-17 K8, and other payment modules are Paypal Express Checkout, and now Square Payments. After completing several test payments in the new square module I noticed that while the order total shows the sales tax as calculated, when the person checks out using Paypal or Square only the sub-total and shipping amounts are included in the transaction charge.

Square Payments
Attachment 17209

PayPal Express
Attachment 17210

I have gone through all of my past PayPal orders since 2014 and from what I can tell the last good transaction where the TaxCloud taxes were successfully included in the charged transaction was in December 2015 just before it was updated in January 2016 to Version 1.5.4 it would seem that something has been lost that relays the complete total including tax calculation from TaxCloud to the actual payment "Order Total"

Please help me figure out how to get this fixed as I am paying the taxes which should have been paid by the customers.:no:

8 Aug 2017, 3:49 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Taxes Calculated but not Collect in Payments

I suspect there's a conflict happening between the tax addons you've got installed, and now neither is doing its job properly.

My recommendation:

  1. Remove all traces of both of those tax modules. (restoring all the files they changed, removing their added files, and running any uninstall SQL scripts)
  2. Test that the default tax infrastructure works properly, all the way to checkout and payment.
  3. Then re-add whichever module you need, using its latest version compatible with your Zen Cart version. And of course test it to be sure it's working as expected.

The TaxCloud module is invasive, touching dozens of files. I'm not surprised that it's causing troubles.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Aug 2017, 4:17 PM
#3
sammirah avatar

sammirah

Zen Follower

Join Date:
Apr 2012
Location:
Los Angeles, CA
Posts:
185
Plugin Contributions:
2

Re: Taxes Calculated but not Collect in Payments

The last debug logs I have are from July 10, 2016 and it has appeared to work since then but obviously isn't. Here is that log:

 [10-Jul-2016 11:24:56 America/Detroit] Request URI: /webstore/index.php?main_page=checkout_process, IP address: 76.91.194.83
#1  ot_taxcloud_coupon->calculate_deductions() called at [/home/sammirah/public_html/webstore/includes/modules/order_total/ot_coupon.php:59]
#2  ot_coupon->process() called at [/home/sammirah/public_html/webstore/includes/classes/order_total.php:185]
#3  order_total->pre_confirmation_check() called at [/home/sammirah/public_html/webstore/includes/modules/checkout_process.php:68]
#4  require(/home/sammirah/public_html/webstore/includes/modules/checkout_process.php) called at [/home/sammirah/public_html/webstore/includes/modules/pages/checkout_process/header_php.php:14]
#5  require(/home/sammirah/public_html/webstore/includes/modules/pages/checkout_process/header_php.php) called at [/home/sammirah/public_html/webstore/index.php:36]

[10-Jul-2016 11:24:56 America/Detroit] PHP Warning:  Missing argument 1 for ot_taxcloud_coupon::calculate_deductions(), called in /home/sammirah/public_html/webstore/includes/modules/order_total/ot_coupon.php on line 59 and defined in /home/sammirah/public_html/webstore/includes/modules/order_total/ot_taxcloud_coupon.php on line 52
[10-Jul-2016 11:24:56 America/Detroit] Request URI: /webstore/index.php?main_page=checkout_process, IP address: 76.91.194.83
#1  ot_coupon->get_order_total() called at [/home/sammirah/public_html/webstore/includes/modules/order_total/ot_taxcloud_coupon.php:56]
#2  ot_taxcloud_coupon->calculate_deductions() called at [/home/sammirah/public_html/webstore/includes/modules/order_total/ot_coupon.php:59]
#3  ot_coupon->process() called at [/home/sammirah/public_html/webstore/includes/classes/order_total.php:185]
#4  order_total->pre_confirmation_check() called at [/home/sammirah/public_html/webstore/includes/modules/checkout_process.php:68]
#5  require(/home/sammirah/public_html/webstore/includes/modules/checkout_process.php) called at [/home/sammirah/public_html/webstore/includes/modules/pages/checkout_process/header_php.php:14]
#6  require(/home/sammirah/public_html/webstore/includes/modules/pages/checkout_process/header_php.php) called at [/home/sammirah/public_html/webstore/index.php:36]

[10-Jul-2016 11:24:56 America/Detroit] PHP Warning:  Missing argument 1 for ot_coupon::get_order_total(), called in /home/sammirah/public_html/webstore/includes/modules/order_total/ot_taxcloud_coupon.php on line 56 and defined in /home/sammirah/public_html/webstore/includes/modules/order_total/ot_coupon.php on line 478
[10-Jul-2016 11:24:56 America/Detroit] Request URI: /webstore/index.php?main_page=checkout_process, IP address: 76.91.194.83
#1  ot_taxcloud_coupon->calculate_deductions() called at [/home/sammirah/public_html/webstore/includes/modules/order_total/ot_coupon.php:59]
#2  ot_coupon->process() called at [/home/sammirah/public_html/webstore/includes/classes/order_total.php:67]
#3  order_total->process() called at [/home/sammirah/public_html/webstore/includes/modules/checkout_process.php:75]
#4  require(/home/sammirah/public_html/webstore/includes/modules/checkout_process.php) called at [/home/sammirah/public_html/webstore/includes/modules/pages/checkout_process/header_php.php:14]
#5  require(/home/sammirah/public_html/webstore/includes/modules/pages/checkout_process/header_php.php) called at [/home/sammirah/public_html/webstore/index.php:36]

[10-Jul-2016 11:24:56 America/Detroit] PHP Warning:  Missing argument 1 for ot_taxcloud_coupon::calculate_deductions(), called in /home/sammirah/public_html/webstore/includes/modules/order_total/ot_coupon.php on line 59 and defined in /home/sammirah/public_html/webstore/includes/modules/order_total/ot_taxcloud_coupon.php on line 52
[10-Jul-2016 11:24:56 America/Detroit] Request URI: /webstore/index.php?main_page=checkout_process, IP address: 76.91.194.83
#1  ot_coupon->get_order_total() called at [/home/sammirah/public_html/webstore/includes/modules/order_total/ot_taxcloud_coupon.php:56]
#2  ot_taxcloud_coupon->calculate_deductions() called at [/home/sammirah/public_html/webstore/includes/modules/order_total/ot_coupon.php:59]
#3  ot_coupon->process() called at [/home/sammirah/public_html/webstore/includes/classes/order_total.php:67]
#4  order_total->process() called at [/home/sammirah/public_html/webstore/includes/modules/checkout_process.php:75]
#5  require(/home/sammirah/public_html/webstore/includes/modules/checkout_process.php) called at [/home/sammirah/public_html/webstore/includes/modules/pages/checkout_process/header_php.php:14]
#6  require(/home/sammirah/public_html/webstore/includes/modules/pages/checkout_process/header_php.php) called at [/home/sammirah/public_html/webstore/index.php:36]

[10-Jul-2016 11:24:56 America/Detroit] PHP Warning:  Missing argument 1 for ot_coupon::get_order_total(), called in /home/sammirah/public_html/webstore/includes/modules/order_total/ot_taxcloud_coupon.php on line 56 and defined in /home/sammirah/public_html/webstore/includes/modules/order_total/ot_coupon.php on line 478 
8 Aug 2017, 4:25 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Taxes Calculated but not Collect in Payments

PHP Warning: Missing argument 1 for ot_coupon::get_order_total(), called in /home/sammirah/public_html/webstore/includes/modules/order_total/ot_taxcloud_coupon.php on line 56 and defined in /home/sammirah/public_html/webstore/includes/modules/order_total/ot_coupon.php on line 478
As suspected, the error is in the taxcloud code.

Again, with the understanding that you're not even trying to use TaxCloud, I recommend just removing all the TaxCloud crud.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Aug 2017, 6:22 PM
#5
sammirah avatar

sammirah

Zen Follower

Join Date:
Apr 2012
Location:
Los Angeles, CA
Posts:
185
Plugin Contributions:
2

Re: Taxes Calculated but not Collect in Payments

After carefully removing all associated files except admin_access.php, and general.php I then had to overwrite includes>classes>order.php
I finally got it to work properly. I do like TaxCloud but there are some issues that need to be fixed in the newest version, in the meantime I will just accept CA taxes til things are worked out.

18 Feb 2018, 11:30 PM
#6
sonnyjlewis avatar

sonnyjlewis

New Zenner

Join Date:
Feb 2018
Location:
Hilliard, Ohio
Posts:
13
Plugin Contributions:
0

Re: Taxes Calculated but not Collect in Payments

Did you ever get this resolved? I have a new instance (1.5.5e new installation PHP 5.4.16, MySQL 5.5.56-MariaDB, with USPS Shipping Rates, TaxCloud, and Square plugins installed, everything set up from FTP and zc_install), set up, from scratch, that has been working just fine displaying taxes as calculated by taxcloud, and then I realized when it was sent to Square for payment processing, they were only charging the pre-tax amount, and has only ever sent the pre-tax amount to Square. Its as if they are being passed the incorrect amount to process.

I discovered this after upgrading another instance I had running for a different project (we moved to a new server). We had a store set up since 5-29-2013, freshly installed at 1.5.1, PHP 5.3.3, MySQL 5.0.83-community, USPS shipping rates, TaxCloud, PayPal, and Stock by Attributes plugins installed. Everything works great on that, PayPal collects the correct amount of tax, no issues.

I ported that instance to our new server, upgraded to 1.5.5f (PHP 5.6.30, MySQL 5.5.5-10.1.31-MariaDB) following the guide, reinstalled the plugins with the most recent version (taxcloud, USPS shipping rates, Stock by Attributes, PayPal, Square) the site worked great. When checking out, the tax was displayed properly, all the plugins seemed to be doing their job....until I checked the amount processed by both PayPal and square. Again, it was just passing the pre-tax amount.

So it looks like somewhere between 1.5.1 and 1.5.5 (and the appropriate taxcloud plugin versions), something has gone awry, and it's affecting both new installations and upgrades. In the logs, no errors are reported. The only way I discovered this was when testing the Refund, and entered the full amount including tax, and it reported that the refund amount was greater than the amount charged initially (that did show up in the logs).

If I was in a state that was source-based sales tax, it wouldn't be an issue, I'd just set up a simple rule for the correct tax for my location for all orders shipped in-state. However, I'm in Ohio, and we are a destination-based tax state, and sales taxes are not uniform across the state. Each county has its own tax rate, and some municipalities within the same county can have a different rate. Shipping is also taxed (which TaxCloud is calculating properly). This is the reason I've been using TaxCloud for years. They automatically file and pay for us (after withdrawing the appropriate amount from our checking account).

If anyone can help me figure this out I'd be forever greatful!