Java conflict not allowing customer to enter VISA details

Hi again . . always a saga . . so I have my webiste - www.nailcrazy.com for years now with x theme . . and i have been using Braintree to support VISA payments - and all was good and working just fine. Its set up correct - and im very happy with them as well. - Sadly however… recently my customers report they are in the cart . . to check out - and when they tick the VISA payment . . the system - shows all the boxes to fill in . . ( card no . . expiry date - ccv etc… ) but it does not allow them to fill in the details… - SO i tested myself - and its true - so i reported to Braintree support and got this message back…

so i tried to deactivate plugins i think - i was using or installed but the problem still persists . . which is why im here - can anyone please shed some light - thanks - Andrew

Hello Andrew,

Thanks for reaching out to Braintree and sorry to hear about the issues your customer is running into!

After carefully reviewing your checkout and looking through our server-logs I would highly recommend reaching out to the developer of your WooCommerce plugin (I believe for your plugin, it was created by WooCommerce directly).

The reason being is that when I go to your checkout I was also unable to get your payment form to allow me to enter in any information. I checked the dev console and noticed this:

The Invalid or unexpected token error has been raised in the past in situations in which a Braintree client token has become malformed in some way. It is possible that you have a WordPress plugin or theme that is causing a conflict, or there could be an issue within your theme or WooCommerce’s Braintree integration.

Unfortunately we have very limited visibility into your integration, which is why I recommend you reach out to WooCommerce directly. Feel free to CC us on any communication you have with WooCommerce in case any additional information is needed from us.

Hi There,

Thanks for writing in!

Your screenshot shows some JS error which is causing the VISA payment issue. This may be due to several reason.
I would request you to please check following points carefully.

  1. Ensure everything is up to date according to our version compatibility list at https://theme.co/apex/forum/t/troubleshooting-version-compatibility/195. Please follow the best practices when updating your theme and plugins. See https://theme.co/apex/forum/t/setup-updating-your-themes-and-plugins/62 for more details.

  2. Test for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

  3. Remove custom CSS, Javascript and templates.

  4. Reset your htaccess file by renaming it to .htaccess-bak. Then in WP Admin Menu, go to Settings > Permalinks and just click the Save Changes button.

  5. Incorrect setup of SSL. If you have an SSL certificate on your site. You should have the WordPress Site URL and Address URL settings set to HTTPS if you are loading the builder via HTTPS. This can be checked via your wp-admin > general > settings. If you aren’t using SSL you can ignore this step.

  6. Caching. If you have a caching plugin activated or any form of server side caching please disable it to test for any possible conflicts. If you have server side caching or aren’t sure if you do, your host should be able to advise of this and disable it for testing purposes on your account.

  7. Cloudflare. If you are using Cloudflare please disable this for testing purposes. Cloudflare by default enables an auto minfication function to compress the JS and CSS files of the theme. As the theme already serves minified files, re-minifying said files only causes to break the entire site.

  8. Custom code syntax error. If you have a child theme, please enable the child theme and check if the issue still exists. If you have entered any custom JS or CSS into their respective editors. Please review the code for any syntax errors. A mis-placed semi-colon or a missing bracket will cause the issue you’re seeing.

In case the issue persists, would you mind providing us with login credentials so we can take a closer look? Please provide following information:
Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials
    All the best!

super thanks - you gave me a lot of pointers try check . . . so in that respect - i will try and sus it out on my own first. - As much as i can. I already tried some pluing check . . and even diabled w3total cashe - but so far to no avail. - so im gonna try and follow your list - and check everything as much as i can - and will report back :}

Hi again,

In addition to that make sure you backup your Custom CSS and JavaScript before removing from the theme as I see the JavaScript you have in Theme Options > JS is triggering an error.

Do let us know how this goes!

hi again . . oh dear where do i start . … . so in my Cpanel . . i can report this
my php is set to Ver 7
wordpress is showing - 4.9.5 ( and when i click to update it tells me the version already installed is the same so its not updating - but showing a way to force update ) ( but in wp - admin -on the bottom it says 4.9.7
as for x ver 6.1.6 in installed
corner stone 3.1.6 - in the plugins
slider rev is also good.
what i can see that is weird is that all the x plugins i have installed - like content block - facebook . . google analyliitics . . etc… - they are all 1.1.3 or 1.1.0 - but no where is there any way i can see to update them to 2.0.x like the x trouble shooting is showing they have to be. - any suggestions please :}} - thanks - much obliged.

so now in theme options - i copied this java text to a text file - and delete everyting . . so my custom java is clear . . but it did not fix. - ( from what i can see my site was Not effected - but it did not fix anything either - ( im still with the same problem ) - now i will try the CSS and report.

(function(i,s,o,g,r,a,m){i[\‘GoogleAnalyticsObject\’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,\‘script\’,\’//www.google-analytics.com/analytics.js\’,\'ga\’);

ga(\‘create\’, \‘UA-41660438-1\’, \‘theme.co\’);
ga(\‘send\’, \‘pageview\’);

);

ok - i removed all the CSS from Theme options - but this did not fix either - this is what was there :{
thanks - andrew

.home-tab-img {
display: block;
margin-left: auto;
margin-right: auto;
}@media (min-width: 180px){
.search-results .x-main > article {
width: 25%;
float: left;
overflow: hidden;
position: relative;
margin: 0 2% 4.5% 0;
padding: 0;
text-align: center;
background-color: #fff;
}

.search-results .x-pagination {
    clear: both;
}
 .woocommerce-checkout form .payment_methods li:nth-child(2) label img {
  display: initial;

}

.woocommerce-account form .payment_methods label img,
.woocommerce-checkout form .payment_methods label img {
display: initial;
max-width: 150px;
}

.woocommerce-account form .payment_methods label a,
.woocommerce-checkout form .payment_methods label a {
display: block;
}

.payment_box.payment_method_paypal {
padding-left: 18px;

}
.ubermenu{
display: inline-block;
padding: 20px 0px;
}
}

ok . . so i now also went about to reset the htacess . . in cpanel . . and in the home directory . . the file was already there with bak on it - but them in the _public html folder - i found the file and did the bak extention - and reset the save button on permalinks . . … but NO JOY ::{{{{{{{{ PLease help. :}}}

hey guys - the website - is www.nailcrazy.com -

Hello There,

I have logged in to your site and disabled the JS/CSS minification in W3 Total Cache. I went to the check out page and I can not enter a credit card number.

Please check your site now.

hey i just check and you are defiantly my super hero. - i checked and it all work super duper great :}}} To add a note - the first plugin i disabled to try - was the w3 - and some other plugins i recently installed but it still did not work then. - but now it seems it was in minifcaiton that was causing the problem… and i thank you for your expertise and support ::}} -

I think - a few months ago in my attempt to get better scores on gtmatix and google pagespeed - they results are always like - … your java needs t o be inlined. . . and your minifiaction and to be good etc… so i would find articles on how to do that . . which led me to set what i thought would be something good - which in my mind - would have no idea - that could be the reason - VISA details will be blocked - i just did not think they were related . .so . .as usual - im such an idiot. - and i can not be thankful enough for your help - and insight on this matter ::}} x theme - team -are my super hero theme experts:}} BIG HUGS :}}

You’re welcome, Andrew. Glad we could help.

damn it . . .im back again . . i was soo happy for the weekend . - so i tested as soon as you informed me with the fix . . and i saw with my own eyes the fix was there . was soo so happy :} - sadly today after re inputting though theme options … the CSS and Java . . . and saved . . it went back to the way it was before - so i removed all the script - and saved - and its still not working. I did not touch w3total cashe - so im back to square one. - the visa is not working. - I patiently await your reply ;{ - big thanks - a

so i turned all the cashes off - from the w3total cash ( but the pluin is still active ) - and still no fix. - this is very wierd - and your input in greatly appreciated :}}

update - now i de activated w3total cash completely - and it still did not fix :{

Hi,

I checked and It seems to work fine on my end

Can you try clearing your browser cache and check again or can you try it in a different browser.

Thanks

hi - i cleared on all on chorme. . . and it failed . . and i also used opera. . .and again it did not work . . and then i used my phone - and with chrome . . and it failed as well. this is wierd again - ( maybe if your browder is not cleared its working ) - im dumbounded.
thanks a

ok - i think i found the fix - . . . so in my frustration . . . . i plugged the css and java - back in through theme options - I uninstalled

Enhanced E-commerce for Woocommerce store

and

The SEO Framework - Extension Manager was successfully deleted.

and i saw this and removed it as well ( cause i swithed to ubermenu ) - and

Max Mega Menu was successfully deleted.

presto . . my customers can enter their VISA details… . i think :}}

my w3 total cashe is still not active - so i cant even purge any cashes . . . but i tried also with opera and it worked as well ::}}

i did not imagine how delicate the java actually is . . and a simple plugin could have been the cause of all this agro . .

my sincere apologies for all the time we wasted together . .

but i want to thank you guys from the bottom of my heart . . . and keep it up :}} - i love you guys :} big hugs :}

Glad it’s okay now, yes, javascript error could affect other javascript since most of the site uses it.

Thanks!