Forums / Addon Payment Modules / TaxCloud Addon

TaxCloud Addon

Views: 84,709

Results 101 to 120 of 158
14 Aug 2018, 1:58 PM
#101
chuckphillips avatar

chuckphillips

Zen Follower

Join Date:
Sep 2012
Location:
Upstate South Carolina
Posts:
106
Plugin Contributions:
1

TaxCloud Addon

It's https://155 dot legend-plates dot com.

Console log:

index.php?main_page=taxcloud_exemptions:187 Uncaught TypeError: $(...).on is not a function
at HTMLDocument.<anonymous> (index.php?main_page=taxcloud_exemptions:187)
at j (jquery.js:3073)
at Object.fireWith [as resolveWith] (jquery.js:3185)
at Function.ready (jquery.js:3391)
at HTMLDocument.I (jquery.js:3407)
(anonymous) @ index.php?main_page=taxcloud_exemptions:187
j @ jquery.js:3073
fireWith @ jquery.js:3185
ready @ jquery.js:3391
I @ jquery.js:3407
cert.min.js:1 Uncaught ReferenceError: babelHelpers is not defined
at s.(/anonymous function).(anonymous function)._createButtons (https://taxcloud.net/imgs/cert.min.js:1:35168)
at s.(/anonymous function).(anonymous function)._create (https://taxcloud.net/imgs/cert.min.js:1:32859)
at s.(/anonymous function).(anonymous function)._createWidget (https://taxcloud.net/imgs/cert.min.js:1:5643)
at new s.(/anonymous function).(anonymous function) (https://taxcloud.net/imgs/cert.min.js:1:4600)
at HTMLDivElement.<anonymous> (cert.min.js:1)
at Function.each (jquery.min.js:33)
at init.each (jquery.min.js:26)
at init.s.fn.(/anonymous function) [as dialog] (https://taxcloud.net/imgs/cert.min.js:1:5164)
at buildExemptCert (cert.min.js:1)
at HTMLDocument.<anonymous> (index.php?main_page=taxcloud_exemptions:399)
_createButtons @ cert.min.js:1
_create @ cert.min.js:1
_createWidget @ cert.min.js:1
s.(anonymous function).(anonymous function) @ cert.min.js:1
(anonymous) @ cert.min.js:1
each @ jquery.min.js:33
each @ jquery.min.js:26
s.fn.(anonymous function) @ cert.min.js:1
buildExemptCert @ cert.min.js:1
(anonymous) @ index.php?main_page=taxcloud_exemptions:399
ready @ jquery.min.js:29
u @ jquery.min.js:37

15 Aug 2018, 3:53 PM
#102
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: TaxCloud Addon

chuck,
u r correct. it is a jquery conflict issue. i would start by reviewing this document:

https://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/

changing the namespace would definitely work, but i think you need to clean up which jquery version you want to run. there is clearly no need to load multiple versions of it.

it is a bit of trial and error. the problem is that when you use multiple plugins that all require the jquery library (and other libraries that depend on it), you end up loading jquery multiple times which creates its own problems.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

15 Aug 2018, 8:29 PM
#103
chuckphillips avatar

chuckphillips

Zen Follower

Join Date:
Sep 2012
Location:
Upstate South Carolina
Posts:
106
Plugin Contributions:
1

Re: TaxCloud Addon

Thanks for the input, Carl. I think the taxcloud_exemptions page needs to be re-worked in php/html and dump jquery. Know of any problems I might encounter?

15 Aug 2018, 9:55 PM
#104
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: TaxCloud Addon

ChuckPhillips:

Thanks for the input, Carl. I think the taxcloud_exemptions page needs to be re-worked in php/html and dump jquery. Know of any problems I might encounter?

in answer to your question, i do not know of any problems that you might encounter. that does not mean you will not encounter any.... i have zero experience with this plugin...

that said, i am a big fan of jquery and what it provides.... and personally i would put the work into making this plugin work in your install with jquery as opposed to without... i think the experience gained is better served... but again just my opinion....

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

24 Sep 2018, 1:07 AM
#105
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: TaxCloud Addon

I'm interested in this, but the taxcloud.net site won't load for me.

Where can I find more information about how this service works (besides reviews)? What is the difference between the free version and the paid one?

24 Sep 2018, 2:02 PM
#106
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: TaxCloud Addon

For anyone else having problems with their UI, try this link: prev.taxcloud.com

22 Nov 2018, 7:28 PM
#107
perry_d_vogel avatar

perry_d_vogel

New Zenner

Join Date:
Jan 2015
Location:
Grand Forks, North Dakota, United States
Posts:
4
Plugin Contributions:
0

Re: TaxCloud Addon

Does the TaxCloud Addon prevent the "Redundant API" lookups?

• Redundant API Fees: Additionally, if a Merchant sends TaxCloud repeated identical
TaxCloud Lookups, the Merchant will pay a fee of $0.04 per redundant TaxCloud API
Transaction call. This fee is intended to discourage ‘chatty’ API implementation and
encourage more efficient communications between Merchant and TaxCloud, which
enables faster processing for all in our Merchant community. (Repeat identical TaxCloud
Lookups are indicated in the TaxCloud UI with a specific icon, so Merchant will know
when they are sending repeat API calls to TaxCloud).

26 Nov 2018, 1:20 PM
#108
sonnyjlewis avatar

sonnyjlewis

New Zenner

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

Re: TaxCloud Addon

It does not prevent redundant lookups. We get charged for them, unfortunately.

16 Dec 2018, 6:29 PM
#109
hryblzk0 avatar

hryblzk0

New Zenner

Join Date:
Dec 2018
Posts:
1
Plugin Contributions:
0

Re: TaxCloud Addon

sonnyjlewis:

OK guys, I have an issue with my installation. 1.5.5f (upgraded from 1.5.5e original install) on an Apache server. I am using the taxcloud plugin as I'm participating in the Streamlined Sales Tax Initiative. When using the TaxCloud plugin, when someone checks out, they are presented with the order total, which shows product price, shipping, and tax properly. However, when their card gets charged, the tax amount isn't being collected. I've tried this with several payment processors so I'm certain it doesn't have to do with them. I think it's the way TaxCloud is passing the correct amount to the payment gateway but that's just a guess on my part.

I am running two different stores, both of which are on 1.5.5f and both are experiencing this issue. One of the stores was formerly on an older version, 1.3.somethingorother, and the taxcloud plugin for that version worked properly.

One current site is running PHP 7.1, and the other is running 5.6.3. Both are using MySQL 5.5.5-10.1.31-MariaDB.

Any thoughts on getting this to work right would be appreciated. If I had a clue about PHP I'd probably have this fixed but I'm no programmer and code mystifies me.

Any ideas on what the fix would be?

Thanks

Looks like the issue (at least with PayPal) is an API change in the PayPal module. The following change should fix the issue there.

--- a/taxcloud/includes/modules/payment/paypalwpp.php
+++ b/taxcloud/includes/modules/payment/paypalwpp.php
@@ -1274,9 +1274,9 @@ if (false) { // disabled until clarification is received about coupons in PayPal
       //TaxCloud hack for PayPal plugin
       $taxCloudTax = $_SESSION['taxcloudTaxTotal']; 
       if ( isset($taxCloudTax)) {
-           $optionsST['TAXAMT']      = round($taxCloudTax,2);
+           $optionsST['PAYMENTREQUEST_0_TAXAMT'] = round($taxCloudTax,2);
            //Update total
-           $optionsST['AMT'] = $optionsST['AMT'] + $taxCloudTax;
+           $optionsST['PAYMENTREQUEST_0_AMT'] = $optionsST['PAYMENTREQUEST_0_AMT'] + $taxCloudTax;
       }
       //End TaxCloud hack
 

This is around line 1274 in includes/modules/payment/paypalwpp.php for an unmodified ZC 1.5.5f. Replace the lines marked with minus signs (-) with the lines marked with plus signs (+).

The TaxCloud module touches a lot of core files, which means it isn't very modular. It's probably going to be a headache to maintain the module across ZC versions, and the official TaxCloud account on the forum (and their github) went silent three years ago. For one thing, the changes between ZC 1.5.5f and 1.5.6 mean that the same module can't be used across both.

21 Dec 2018, 2:39 PM
#110
larrylmiller avatar

larrylmiller

New Zenner

Join Date:
Oct 2016
Location:
Mississippi
Posts:
8
Plugin Contributions:
0

Re: TaxCloud Addon

We are being charged for redundant lookups as well. Is there a way to log the lookups?

26 Dec 2018, 12:21 AM
#111
sammirah avatar

sammirah

Zen Follower

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

Re: TaxCloud Addon

LarryLMiller:

We are being charged for redundant lookups as well. Is there a way to log the lookups?

You need to call taxcloud: If you are signed up for automated compliance, you should not be, being charged. 1-877-TAXCLOUD keep calling til you get someone.

26 Dec 2018, 9:16 PM
#112
sammirah avatar

sammirah

Zen Follower

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

Re: TaxCloud Addon

Ok so after the upgrade to 1.5.6 I was comparing my the Developer's Tool Kit logs between my live site and the test site and realized that there were entire parts of the module missing. So after backing up everything in the test site, I removed and reinstalled the Taxcloud 16b module. The store side works well but I am getting an issue in the admin area, I am looking at the log and I know there is something I am not understanding?

The log shows:

 
 myDEBUG-adm-1545852159-733497.log ( ASCII text ) 
[26-Dec-2018 14:22:40 America/Detroit] Request URI: /webstore2/zcadmin/orders.php?oID=144&origin=index, IP address: 23.243.5.141
#1  require_once() called at [/home/sammirah/public_html/webstore2/includes/classes/order.php:34]
#2  include(/home/sammirah/public_html/webstore2/includes/classes/order.php) called at [/home/sammirah/public_html/webstore2/zcadmin/orders.php:32]
[26-Dec-2018 14:22:40 America/Detroit] PHP Warning:  require_once(includes/modules/TaxCloud/func.taxcloud.php): failed to open stream: No such file or directory in /home/sammirah/public_html/webstore2/includes/classes/order.php on line 34
[26-Dec-2018 14:22:40 America/Detroit] PHP Fatal error:  require_once(): Failed opening required 'includes/modules/TaxCloud/func.taxcloud.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/php56/lib/php') in /home/sammirah/public_html/webstore2/includes/classes/order.php on line 34

The file includes/classes/order.php on line 34 simply says:

require_once DIR_WS_MODULES . 'TaxCloud/func.taxcloud.php';

I think this means there is a missing phrase that makes the module do something but I have no idea how to write it to make it do what it is supposed to do, I appreciate any help with this please.

26 Dec 2018, 10:27 PM
#113
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: TaxCloud Addon

it is complaining about a file not being there OR the file could have the incorrect ownership/permissions.

is the file:

/home/sammirah/public_html/webstore2/includes/modules/TaxCloud/func.taxcloud.php

there? and is the ownership and permissions similar to the other files in that directory?

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

27 Dec 2018, 12:17 AM
#114
sammirah avatar

sammirah

Zen Follower

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

Re: TaxCloud Addon

carlwhat:

it is complaining about a file not being there OR the file could have the incorrect ownership/permissions.

is the file:

/home/sammirah/public_html/webstore2/includes/modules/TaxCloud/func.taxcloud.php

there? and is the ownership and permissions similar to the other files in that directory?

Yes the file is there ```php

<?php /** * TaxCloud v1.5 * @license https://taxcloud.net/ftpsl.pdf */ require("classes.php"); define('TAXCLOUD_VERSION', 'v1.5'); define('FILENAME_TAXCLOUD', 'taxcloud'); define('BOX_TAXES_TAXCLOUD', 'TaxCloud Tax Calculation'); function func_taxcloud_get_client() { if ( isset($client) ) { return $client; } else { $client = new SoapClient("https://api.taxcloud.net/1.0/TaxCloud.asmx?wsdl"); return $client; } } function func_taxcloud_is_enabled($country_code='') { if ($country_code != '223') { return false; } $configuration_query = "select c.configuration_value from " . TABLE_CONFIGURATION . " c, " . TABLE_CONFIGURATION_GROUP . " cg where cg.configuration_group_title = 'TaxCloud Configuration Settings' and c.configuration_key = 'TAXCLOUD_ENABLED' and c.configuration_group_id = cg.configuration_group_id"; global $db; $results = $db->Execute($configuration_query); $isEnabled = $results->fields['configuration_value']; return $isEnabled; } /** * Verify an address using TaxCloud service */ function func_taxcloud_verify_address($address, &$err) { global $client; // Verify the address through the TaxCloud verify address service $params = array( "uspsUserID" => TAXCLOUD_USPS_ID, "address1" => $address->getAddress1(), "address2" => $address->getAddress2(), "city" => $address->getCity(), "state" => $address->getState(), "zip5" => $address->getZip5(), "zip4" => $address->getZip4()); try { $client = func_taxcloud_get_client(); $verifyaddressresponse = $client->verifyAddress( $params ); } catch (Exception $e) { //retry in case of timeout try { $verifyaddressresponse = $client->verifyAddress( $params ); } catch (Exception $e) { // $err[] = "Error encountered while verifying address ".$address->getAddress1(). // " ".$address->getState()." ".$address->getCity()." "." ".$address->getZip5(). // " ".$e->getMessage(); // //irreparable, return return null; } } if($verifyaddressresponse->{'VerifyAddressResult'}->ErrNumber == 0) { // Use the verified address values $address->setAddress1($verifyaddressresponse->{'VerifyAddressResult'}->Address1); $address->setAddress2($verifyaddressresponse->{'VerifyAddressResult'}->Address2); $address->setCity($verifyaddressresponse->{'VerifyAddressResult'}->City); $address->setState($verifyaddressresponse->{'VerifyAddressResult'}->State); $address->setZip5($verifyaddressresponse->{'VerifyAddressResult'}->Zip5); $address->setZip4($verifyaddressresponse->{'VerifyAddressResult'}->Zip4); } else { // $err[] = "Error encountered while verifying address ".$address->getAddress1(). // " ".$address->getState()." ".$address->getCity()." "." ".$address->getZip5(). // " ".$verifyaddressresponse->{'VerifyAddressResult'}->ErrDescription; return null; } return $address; } function func_taxcloud_get_customer_address($delivery) { // Customer's address $destination = new Address(); $destination->setAddress1($delivery['street_address']); $destination->setAddress2(''); $destination->setCity($delivery['city']); $destination->setState($delivery['state']); // Two character state appreviation $destination->setZip5($delivery['postcode']); $destination->setZip4(''); return $destination; } /** * Get the store's location */ function func_taxcloud_get_company_address() { $origin = new Address(); $origin->setAddress1(TAXCLOUD_STORE_ADDR); $origin->setZip5(TAXCLOUD_STORE_ZIP); return $origin; } /** * Retrieves a product's TIC ID. * @param $product_id */ function func_taxcloud_get_tic($product_id) { global $db; $query = "select tax_class_title from ".TABLE_PRODUCTS .", ".TABLE_TAX_CLASS." where products_tax_class_id = tax_class_id and products_id = ".$product_id; $result = $db->Execute($query); $tic = $result->fields['tax_class_title']; $i = preg_match("/^(\d+)/", $tic); if($i != 0) return $tic; else return $i; } /** * Look up tax cost using TaxCloud web services * @param $product * @param $customer */ function func_taxcloud_lookup_tax($products,$customerAddress,&$errMsg,$shipping, $exemptionCertificate) { global $client; $origin = func_taxcloud_get_company_address(); $origin = func_taxcloud_verify_address($origin, $errMsg); if(is_null($origin)) return -1; //Verify Customer's destination $destination = func_taxcloud_get_customer_address($customerAddress); $verified_destination = func_taxcloud_verify_address($destination, $errMsg); if(!is_null($verified_destination)) { $destination = $verified_destination; } if(!is_null($origin) && !is_null($destination)) { $cartItems = Array(); $index = 0; foreach ($products as $k => $product) { $cartItem = new CartItem(); preg_match("/^(\d+)/", $product['id'], $match); $cartItem->setItemID($match[0]); $cartItem->setIndex($index); // Each cart item must have a unique index $tic = func_taxcloud_get_tic($match[0]); if(!$tic) { //no TIC has been assigned to this product, use default $tic = null; } $cartItem->setTIC($tic); $price = $product['final_price']; $cartItem->setPrice($price); // Price of each item $cartItem->setQty($product['qty']); // Quantity $cartItems[$index] = $cartItem; $index++; } //Shipping as a cart item $cartItem = new CartItem(); $cartItem->setItemID('shipping'); $cartItem->setIndex($index); $cartItem->setTIC(11010); $cartItem->setPrice($shipping); $cartItem->setQty(1); $cartItems[$index] = $cartItem; $params = array( "apiLoginID" => TAXCLOUD_API_ID, "apiKey" => TAXCLOUD_API_KEY, "customerID" => $_SESSION['customer_id'], "cartID" => $_SESSION['cartID'], "cartItems" => $cartItems, "origin" => $origin, "destination" => $destination, "deliveredBySeller" => false, "exemptCert" => $exemptionCertificate ); $client = func_taxcloud_get_client(); try { $lookupResponse = $client->lookup( $params ); } catch (Exception $e) { //retry try { $lookupResponse = $client->lookup( $params ); } catch (Exception $e) { $errMsg[] = "Error encountered looking up tax amount ".$e->getMessage(); //irreparable, return return -1; } } $lookupResult = $lookupResponse->{'LookupResult'}; if($lookupResult->ResponseType == 'OK' || $lookupResult->ResponseType == 'Informational') { $cartItemsResponse = $lookupResult->{'CartItemsResponse'}; $cartItemResponse = $cartItemsResponse->{'CartItemResponse'}; $taxes = Array(); $index = 0; //response may be an array if ( is_array($cartItemResponse) ) { foreach ($cartItemResponse as $c) { $amount = ($c->TaxAmount); $taxes[$index] = $amount; $index++; } } else { $amount = ($cartItemResponse->TaxAmount); $taxes[0] = $amount; } $cartID = $lookupResult->CartID; if ( isset($cartID) ) { $_SESSION['cartID'] = $cartID; } $taxTotal = 0; //Calculate tax totals foreach( $taxes as $tax ) { $taxTotal = $taxTotal + round($tax,2); } $_SESSION['taxcloudTaxTotal'] = $taxTotal; return array('name' => 'Sales Tax', 'tax' => $taxTotal); } else { $errMsgs = $lookupResult->{'Messages'}; foreach($errMsgs as $err) { $errMsg[] = "Error encountered looking up tax amount ".$err->{'Message'}; } return -1; } } else { return -1; } } /** * Authorized with Capture * @param $orderID */ function func_taxcloud_authorized_with_capture($orderID, &$errMsg) { global $client; $result = 0; $dup = "This purchase has already been marked as authorized"; // Current date - example of format: '2010-09-08T00:00:00'; $dateAuthorized = date("Y-m-d"); $dateAuthorized = $dateAuthorized . "T00:00:00"; $params = array( "apiLoginID" => TAXCLOUD_API_ID, "apiKey" => TAXCLOUD_API_KEY, "customerID" => $_SESSION['customer_id'], "cartID" => $_SESSION['cartID'], "orderID" => $orderID, "dateAuthorized" => $dateAuthorized, "dateCaptured" => $dateAuthorized); $client = func_taxcloud_get_client(); // The authorizedResponse array contains the response verification (Error, OK, ...) $authorizedResponse = null; try { $authorizedResponse = $client->authorizedWithCapture( $params ); } catch (Exception $e) { //infrastructure error, try again try { $authorizedResponse = $client->authorizedWithCapture( $params ); $authorizedResult = $authorizedResponse->{'AuthorizedWithCaptureResult'}; if ($authorizedResult->ResponseType != 'OK') { $msgs = $authorizedResult->{'Messages'}; $respMsg = $msgs->{'ResponseMessage'}; //duplicate means the the previous called was good. Therefore, consider this to be good if (trim ($respMsg->Message) == $dup) { return 1; } } else if ($authorizedResult->ResponseType == 'Error') { $msgs = $authorizedResult->{'Messages'}; $respMsg = $msgs->{'ResponseMessage'}; //duplicate means the the previous called was good. Therefore, consider this to be good if (trim ($respMsg->Message) == $dup) { return 1; } else { $errMsg[] = "Error encountered looking up tax amount ".$respMsg; return -1; } } else { return -1; } } catch (Exception $e) { //give up $errMsg[] = $e->getMessage(); return 0; } } $authorizedResult = $authorizedResponse->{'AuthorizedWithCaptureResult'}; if ($authorizedResult->ResponseType == 'OK') { $_SESSION['singlePurchase'] = null; //one-time certificate $_SESSION['selectedCertID'] = null; //saved certificate // $_SESSION['taxcloudTaxTotal'] = null; return 1; } else { $msgs = $authorizedResult->{'Messages'}; $respMsg = $msgs->{'ResponseMessage'}; $errMsg [] = $respMsg->Message; return 0; } return $result; } function func_taxcloud_add_exemption_certificate($exemptionCertificate,$customerID) { global $client; $params = array( "apiLoginID" => TAXCLOUD_API_ID, "apiKey" => TAXCLOUD_API_KEY, "customerID" => $customerID, "exemptCert" => $exemptionCertificate ); try { $client = func_taxcloud_get_client(); $addExemptionResponse = $client->addExemptCertificate( $params ); } catch (Exception $e) { return -1; } } function func_taxcloud_get_exemption_certificates($customerID) { global $client; $params = array( "apiLoginID" => TAXCLOUD_API_ID, "apiKey" => TAXCLOUD_API_KEY, "customerID" => $customerID ); try { $client = func_taxcloud_get_client(); $getExemptCertificatesResponse = $client->getExemptCertificates( $params ); $getCertificatesRsp = $getExemptCertificatesResponse->{'GetExemptCertificatesResult'}; $exemptCertificatesArray = $getCertificatesRsp->{'ExemptCertificates'}; $exemptCertificates = $exemptCertificatesArray->{'ExemptionCertificate'}; if (is_array($exemptCertificates)) { return $exemptCertificates; } else { return $exemptCertificatesArray; } } catch (Exception $e) { return Array(); } return Array(); } function func_taxcloud_delete_exemption_certificate($certID) { global $client; $params = array( "apiLoginID" => TAXCLOUD_API_ID, "apiKey" => TAXCLOUD_API_KEY, "certificateID" => $certID ); try { $client = func_taxcloud_get_client(); $deleteExemptCertificateResponse = $client->deleteExemptCertificate( $params ); } catch (Exception $e) { return -1; } } function func_taxcloud_return_order($order_id) { global $client; global $db; $results = $db->Execute("select products_id, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); $cartItems = Array(); $index = 0; while ( !$results->EOF ) { $fields = $results->fields; $cartItem = new CartItem(); $cartItem->setItemID($fields['products_id']); $cartItem->setIndex($index); $cartItem->setTIC(func_taxcloud_get_tic($fields['products_id'])); $cartItem->setPrice($fields['final_price']); $cartItem->setQty($fields['products_quantity']); $cartItems[$index] = $cartItem; $index++; $results->MoveNext(); } //Reverse the order shipping $results = $db->Execute("select value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' and class = 'ot_shipping'"); while ( !$results->EOF ) { $fields = $results->fields; //Shipping as a cart item $cartItem = new CartItem(); $cartItem->setItemID('shipping'); $cartItem->setIndex($index); $cartItem->setTIC(11010); $cartItem->setPrice($fields['value']); $cartItem->setQty(1); $cartItems[$index] = $cartItem; $index++; $results->MoveNext(); } $returnDate = date("Y-m-d"); $returnDate = $returnDate . "T00:00:00"; $params = array( "apiLoginID" => TAXCLOUD_API_ID, "apiKey" => TAXCLOUD_API_KEY, "orderID" => $order_id, "cartItems" => $cartItems, "returnedDate" => $returnDate); try { $client = func_taxcloud_get_client(); $returnResponse = $client->Returned($params); } catch (Exception $e) { return -1; } } ?>

How do I determine the ownership and permissions?
27 Dec 2018, 1:05 AM
#115
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: TaxCloud Addon

most ftp clients should show the permissions as well as the owner and group. you can try right clicking the filename from within the ftp client that you are using to possibly access the data. its not too hard to see, but you need to look.

i'm thinking that most of these should be 644; but the proper owner/group combo is something that your host can help you with. else you should compare it to other files in a similar tree, ie:

includes/modules/order_total/ot_total.php

as this looks to be a new directory, you would also need to check the ownership/permissions of

includes/modules/TaxCloud

i find it highly unlikely that line 34 of includes/classes/order.php is incorrect; as i see that line as part of the download, but we could look at changing that line as a last resort. it is more likely a permissions issue.

again, you can ask your host if the permissions are correct for this file. depending on the host, they may be able to help you.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

28 Dec 2018, 2:39 AM
#116
sammirah avatar

sammirah

Zen Follower

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

Re: TaxCloud Addon

carlwhat:

most ftp clients should show the permissions as well as the owner and group. you can try right clicking the filename from within the ftp client that you are using to possibly access the data. its not too hard to see, but you need to look.

i'm thinking that most of these should be 644; but the proper owner/group combo is something that your host can help you with. else you should compare it to other files in a similar tree, ie:

includes/modules/order_total/ot_total.php

as this looks to be a new directory, you would also need to check the ownership/permissions of

includes/modules/TaxCloud

i find it highly unlikely that line 34 of includes/classes/order.php is incorrect; as i see that line as part of the download, but we could look at changing that line as a last resort. it is more likely a permissions issue.

again, you can ask your host if the permissions are correct for this file. depending on the host, they may be able to help you.

best.

So, I found out that the permissions were correct 640. Unfortunately I am going to have to let go of this module. I really like taxcloud as it makes my tax collection and filings easier. So I deleted all of the files and replaced the core files with copies from a fresh ZC 1.5.6 installation. Everything is back to normal.

I guess I am just not cut out for all the extra stuff anymore, code makes my head hurt, and I have a small business to run so my time is limited more than ever now.

8 Jan 2019, 3:10 PM
#117
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: TaxCloud Addon

Oddly** TaxCloud 16b** installed **once **on a clean Zen Cart 1.55f but only recorded the first configuration setting - 'TaxCloud Configuration Settings'.

That resulted in the lookup code for the other configuration settings to fail to fire.

There was no error message but the problem behaviour was that I** could** enter in all of my TaxCloud data in Admin > Locations/Taxes > TaxCloud Tax Calculation


and...***

It **would **'update' and show the data again on-screen - but the data wouldn't commit to the database and TaxCloud Enabled would remain 'false'.

Reload the page and it would all be **blank **again.

Because the code could see - 'TaxCloud Configuration Settings' it failed to load these tables into the db:
'TaxCloud API ID', 'TaxCloud API Key', 'USPS_ID', 'Store Street Address', 'Store Zip Code', 'TaxCloud Enabled'

**
The Fix:**

  • Remove all entries of TaxCloud in the **configuration **and configuration_group
  • Log into Zen Admin
  • Navigate to Admin > Locations/Taxes > TaxCloud Tax Calculation
  • Enter Data
    **
    Success!**

The code then fires correctly and installs the tables correctly.

I've installed a lot of modules over the years and occasionally 'removing and reinstalling' the **files doesn't work and some modules do not have SQL **database **removal codes - in this case **manually **removing everything from the SQL database and reinstalling it DID work.

Important to note that the **** TaxCloud 16b fileset was intact, complete and merged properly on the server and - remains intact.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

9 Jan 2019, 7:07 AM
#118
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: TaxCloud Addon

Problem - TaxCloud is using full names for state zones, Zen is using*** 2 digits***.

Zen posted this on-screen error in checkout_payment page during checkout:

Error encountered looking up tax amount The Ship To zip code (89128) is not valid for this state (Ne)

The fix:
This works and was a necessary update after install and testing failed to load the** 2 digit state codes **correctly out of the **** TaxCloud 16b ****box:

https://www.zen-cart.com/showthread.php?221848-TaxCloud-Error-quot-a-matching-lookup-could-not-be-found-quot&p=1343603#post1343603

infinigrove:

I see this thread is a year old but I was having the same problem with the latest version of the TaxCloud module with ZC v1.5.5f

It was giving me "Error encountered looking up tax amount The Ship To State (Ne) is not valid" when trying to do New York (NY) state or any other state where the 2-Letter state code was not the first 2 characters of the state name.

What I did to resolve this issue is first modify ** includes/classes/order.php** to lookup the zone_code in the $shipping_address_query around line 270 by changing:
$shipping_address_query = "select ab.entry_firstname, ab.entry_lastname, ab.entry_company,
ab.entry_street_address, ab.entry_suburb, ab.entry_postcode,
ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id,
c.countries_id, c.countries_name, c.countries_iso_code_2,

to
$shipping_address_query = "select ab.entry_firstname, ab.entry_lastname, ab.entry_company,
ab.entry_street_address, ab.entry_suburb, ab.entry_postcode,
ab.entry_city, ab.entry_zone_id, z.zone_name, z.zone_code, ab.entry_country_id,
c.countries_id, c.countries_name, c.countries_iso_code_2,

Then I added a state_code to the delivery array that contains the zone_code around line 424.
So that this:
$this->delivery = array('firstname' => $shipping_address->fields['entry_firstname'],
'lastname' => $shipping_address->fields['entry_lastname'],
'company' => $shipping_address->fields['entry_company'],
'street_address' => $shipping_address->fields['entry_street_address'],
'suburb' => $shipping_address->fields['entry_suburb'],
'city' => $shipping_address->fields['entry_city'],
'postcode' => $shipping_address->fields['entry_postcode'],

Now looks like:
$this->delivery = array('firstname' => $shipping_address->fields['entry_firstname'],
'lastname' => $shipping_address->fields['entry_lastname'],
'company' => $shipping_address->fields['entry_company'],
'street_address' => $shipping_address->fields['entry_street_address'],
'suburb' => $shipping_address->fields['entry_suburb'],
'city' => $shipping_address->fields['entry_city'],
'postcode' => $shipping_address->fields['entry_postcode'],
'state_code' => $shipping_address->fields['zone_code'],

Then I modified the includes/modules/TaxCloud/func.taxcloud.php to use the state_code instead to the state on line 98 by replacing:

$destination->setState($delivery['state']); // Two character state appreviation

with

$destination->setState($delivery['state_code']); // Two character state abbreviation

Hope this helps.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

14 Jan 2019, 7:46 PM
#119
sammirah avatar

sammirah

Zen Follower

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

Re: TaxCloud Addon

Important to note that the **** TaxCloud 16b fileset was intact, complete and merged properly on the server and - remains intact.

I am catching my 2nd wind on this mod. :laugh: It truly pisses me off every time it comes times to upgrade Zen Cart...I had to go back to zc 1.5.5f when I ran into issues with one of the most vital plug-ins used on my site. Anyhow, I digress, I keep noticing that the admin//includes/auto_loaders/config.taxcloud.php keeps disappearing. I upload it again, leave that area of cPanel and when I come back it is just gone. But the plug in is working fine. Is there a reason why a file would just disappear like that?

15 Jan 2019, 1:55 AM
#120
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: TaxCloud Addon

sammirah:

I am catching my 2nd wind on this mod. :laugh: It truly pisses me off every time it comes times to upgrade Zen Cart...I had to go back to zc 1.5.5f when I ran into issues with one of the most vital plug-ins used on my site. Anyhow, I digress, I keep noticing that the admin//includes/auto_loaders/config.taxcloud.php keeps disappearing. I upload it again, leave that area of cPanel and when I come back it is just gone. But the plug in is working fine. Is there a reason why a file would just disappear like that?

This cute little code:
// Now that the menu item has been created/registered, can stop the wasteful process of having
// this script run again by removing it from the auto-loader array
@unlink(DIR_FS_ADMIN . DIR_WS_INCLUDES . 'auto_loaders/config.taxcloud.php');

in YOUR_ADMIN/includes/init_includes/**init_taxcloud_config.php
**

The interweb says this:

**unlink
**
(PHP 4, PHP 5, PHP 7)

**unlink — Deletes a file
**

It prevents the installer from looping or installing every time you load an admin page.

Though it may not help with site upgrades... it should be included in the newest source module/plugin files **always **(if we continue to code it in this manner).

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian