The Credit card filed not working
-
Hi,
we have added a condition based payment method on our site, then am checking the checkout page the square credit card filed is not working until it refreshes the checkout page.also, I have tried to deactivate all plugin from the site except WooCommerce and square plugin and change the theme to the default WooCommerce theme. but the issue still has on the site. also in console, we are facing this error https://snipboard.io/C40Ndu.jpg. and we are using the latest version of your plugin. could you please check the issue and help to solve it.thank you.
-
Hey there!
we have added a condition based payment method on our site
This seems to be the root cause of the issue, right? If you don’t use that, then it works?
If so, then it looks like that is interfering with the Square plugin ability to create the forms using JS as it should.
Also, you didn’t include a URL in your request, so we have no way of helping further. Always include your site URL when requesting help, as it’s needed for almost any request.
Hello,
Yes, when we not using Condition based payment method then it’s working fine.
this is the website URL: https://wordpress-151096-1328061.cloudwaysapps.com/index.php/shop/ and please add any product to checkout and from there change the country from the US to UK or any other and change back to US. then check the stipe credit card input field also check the console also. when we refresh the checkout page then the fields are showing properly, I think some js is not loading after swapping.Thank you
Since the issue seems to strictly be related to the condition based payment method, I would recommend contacting the author of this method/plugin because it is clearly conflicting with Square.
They should be able to help you further!
I have tried the condition based payment method without using the plugin. instead of plugin i used one snippet at the time also am facing the same issue. then it’s not related to that plugin. the issue is related to square only. can you please check more about this issue.
thank you,
Hello,
Any update on this issue… we have used this snippet.add_filter( ‘woocommerce_available_payment_gateways’, ‘ts_disable_payment_gateway_by_country’ );
function ts_disable_payment_gateway_by_country( $available_payment_gateways ) {
if ( is_admin() ) return $available_payment_gateways;
if ( isset( $available_payment_gateways[‘paypal’] ) && WC()->customer->get_billing_country() == ‘US’ ) {
unset( $available_payment_gateways[‘paypal’] );
}
if ( WC()->customer->get_billing_country() != ‘US’ ) {
if (isset($available_payment_gateways[‘cod’])) { unset($available_payment_gateways[‘cod’]); }
if (isset($available_payment_gateways[‘square_credit_card’])) { unset($available_payment_gateways[‘square_credit_card’]); }
}
return $available_payment_gateways;
}Could you please check the issue, I have tried this code with other payment methods like Strip, at the time everything works fine. but only the issue happens on Square.
Thank you.
Have same issue with the new version 2.2.2.
—————————-
Square Payment Failed (Status code NOT_FOUND: Card on file not found) Order status changed from Pending payment to Failed.
—————————-Hello,
Is there any update on my request. we need to solve the issue ASAP.
Thank you.
Still getting the issue. I found this log. Looks like when guest user trying to pay and they already have an account which used in previous orders then square trying to update some billing. Then the website goes does and generate card file not found.
———
2020-09-28T20:16:45+00:00 CRITICAL Uncaught Error: Call to a member function get_billing_hash() on null in /nas/content/live/devplustkdo/wp-content/plugins/woocommerce-square/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:463
Stack trace:
#0 /nas/content/live/devplustkdo/wp-content/plugins/woocommerce-square/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php(372): SkyVerge\WooCommerce\PluginFramework\v5_4_0\SV_WC_Payment_Gateway_Direct->update_transaction_payment_method(Object(Automattic\WooCommerce\Admin\Overrides\Order))
#1 /nas/content/live/devplustkdo/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(956): SkyVerge\WooCommerce\PluginFramework\v5_4_0\SV_WC_Payment_Gateway_Direct->process_payment(51556)
#2 /nas/content/live/devplustkdo/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1159): WC_Checkout->process_order_payment(51556, ‘square_credit_c…’)
#3 /nas/content/live/devplustkdo/wp-content/plugins/woocommerce/incl in /nas/content/live/devplustkdo/wp-content/plugins/woocommerce-square/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php on line 4632020-09-28T20:27:18+00:00 CRITICAL Uncaught Error: Call to a member function get_billing_hash() on null in /nas/content/live/devplustkdo/wp-content/plugins/woocommerce-square/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:463
Stack trace:
#0 /nas/content/live/devplustkdo/wp-content/plugins/woocommerce-square/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php(372): SkyVerge\WooCommerce\PluginFramework\v5_4_0\SV_WC_Payment_Gateway_Direct->update_transaction_payment_method(Object(Automattic\WooCommerce\Admin\Overrides\Order))
#1 /nas/content/live/devplustkdo/wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(423): SkyVerge\WooCommerce\PluginFramework\v5_4_0\SV_WC_Payment_Gateway_Direct->process_payment(51556)
#2 /nas/content/live/devplustkdo/wp-includes/class-wp-hook.php(287): WC_Form_Handler::pay_action(Object(WP))
#3 /nas/content/live/devplustkdo/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#4 /nas/content/ in /nas/content/live/devplustkdo/wp-content/plugins/woocommerce-square/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php on line 463———
Hello,
Is there any update on my above request “The Credit card filed not working“. we need to fix that issue ASAP.
Thank you.
Hi,
I have tried the condition based payment method without using the plugin. instead of a plugin i used one snippet at the time also am facing the same issue. then it’s not related to that plugin. the issue is related to square only. you can replicate the issue like this. please add any product to checkout and from there change the country from the US to UK or any other and change back to US. then check the stipe credit card input field also check the console also, on console we are getting this error https://snipboard.io/USJad3.jpg . when we refresh the checkout page then the fields are showing properly and the error also went from the console, I think some js is not loading after swapping. Can you please check the issue and we need to solve the issue ASAP.
Thank you
- This reply was modified 4 years, 1 month ago by navas007.
This is not something that we can help with, as the main issue is the code using to swap between available payment methods is causing a JavaScript error, as you see. Perhaps this also is happening in conjunction with other plugins or the theme you are using, so I would recommend a full conflict test to rule those out.
This kind of problem is usually caused by either a conflict with your theme or with another plugin.
?
The best way to determine this is to:- Temporarily switch your theme to Storefront
- Disable all plugins except for WooCommerce
- Repeat the action that is causing the problem
If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.
@rokeyfx please open your own thread with your issue. They are not the same issue, and to give everyone their own attention to their issues, please always create a new issue.
Hello,
Followed your instructions (disabling all plugins and also switched themes) but the same issue exists. now in the site only woocommerce (version: 4.5.2) and WooCommerce Square plugin(version: 2.2.2) we have using. Can you please check the issue and we need to solve the issue ASAP.
This is the website URL: https://wordpress-151096-1328061.cloudwaysapps.com/index.php/shop/
we are using this code for the condition payment method.
add_filter( 'woocommerce_available_payment_gateways', 'ts_disable_payment_gateway_by_country' ); function ts_disable_payment_gateway_by_country( $available_payment_gateways ) { if ( is_admin() ) return $available_payment_gateways; if ( isset( $available_payment_gateways['paypal'] ) && WC()->customer->get_billing_country() == 'US' ) { unset( $available_payment_gateways['paypal'] ); } if ( WC()->customer->get_billing_country() != 'US' ) { if (isset($available_payment_gateways['cod'])) { unset($available_payment_gateways['cod']); } if (isset($available_payment_gateways['square_credit_card'])) { unset($available_payment_gateways['square_credit_card']); } } return $available_payment_gateways; }
Thank you.
- This reply was modified 4 years, 1 month ago by navas007.
Hello,
Is there any update on my above request “The Credit card filed not working“. we need to fix that issue ASAP. am waiting for your last 2days. please respond to this issue…
Thank you.
Hi there @navas007,
I tried Square payment form with Conditional Shipping and Payments that we sell on WooCommerce.com and see the exact same behaviour: when Square form has disappeared and then showed back again on the checkout page, the form can’t be filled in anymore.
I’ve reported this behaviour to our developers as a bug. Please note that it may take some time for it to be evaluated and fixed (think in months). Compatibility issues usually don’t have the highest priority, I’m afraid.
Please follow plugin’s changelog to see when the fix is included to the release: https://www.ads-software.com/plugins/woocommerce-square/#developers
@rokeyfx please use your own thread for reporting additional details, the issue reported in this thread is not related.
Cheers!
- The topic ‘The Credit card filed not working’ is closed to new replies.