NOTE: All of this occurred in Sandbox mode with sandbox API keys.
First, the plugin does not yet appear to work with the new Wordpress/Woocommerce cart and checkout block experiences. You can read more about the new cart and checkout experiences here: https://woo.com/document/cart-checkout-blocks-status/
By switching back to the old shortcode format for the cart and checkout pages, I was able to get the iFrame to load for the cards, however I get an "Email ID is invalid" error when using a valid test card from the test card page (https://docs.clover.com/docs/test-card-numbers) as shown in the attached image:
I went ahead and checked the logs in /wp-content/uploads/wc-logs/clover_payments... and I'm seeing the following "Bad Request" logs:
Additionally, here's a dump of the request form data with some personal info removed (anywhere you see REMOVEDFORPRIVACY), but otherwise unaltered, so notice how some fields were submitted as empty strings (not sure if that's a problem):
billing_first_name=REMOVEDFORPRIVACY billing_last_name=REMOVEDFORPRIVACY billing_company billing_country=US billing_address_1=REMOVEDFORPRIVACY billing_address_2 billing_city=REMOVEDFORPRIVACY billing_state=FL billing_postcode=REMOVEDFORPRIVACY billing_phone=REMOVEDFORPRIVACY billing_email=REMOVEDFORPRIVACY shipping_first_name shipping_last_name shipping_company shipping_country=US shipping_address_1 shipping_address_2 shipping_city shipping_state=FL shipping_postcode shipping_phone order_comments wc_order_attribution_type=typein wc_order_attribution_url=(none) wc_order_attribution_utm_campaign=(none) wc_order_attribution_utm_source=(direct) wc_order_attribution_utm_medium=(none) wc_order_attribution_utm_content=(none) wc_order_attribution_utm_id=(none) wc_order_attribution_utm_term=(none) wc_order_attribution_session_entry=https://REMOVEDFORPRIVACY.com/ wc_order_attribution_session_start_time=2024-01-18 22:26:37 wc_order_attribution_session_pages=4 wc_order_attribution_session_count=2 wc_order_attribution_user_agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0 shipping_method[0]=free_shipping:1 payment_method=clover_payments PostVar clover_token=clv_1TSTSV3Cx7GEW4cwqo4ffYvf clover_token_nonce=1da6c4f856 transaction_result=1 woocommerce-process-checkout-nonce=a75522f08d _wp_http_referer=/?wc-ajax=update_order_review
And here's the JSON response:
{"result":"failure","messages":"<div class=\"wc-block-components-notice-banner is-error\" role=\"alert\">\n\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t<path d=\"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z\"><\/path>\n\t<\/svg>\n\t<div class=\"wc-block-components-notice-banner__content\">\n\t\tEmail ID is invalid, enter valid email ID and retry\t<\/div>\n<\/div>\n","refresh":false,"reload":false}
Finally, here's a dump of the object that was logged to the console by the woo-clv-custom.js script from the plugin (Note the test card data):
{ "card": { "exp_month": "1", "exp_year": "2025", "first6": "378282", "last4": "0005", "brand": "AMEX", "address_zip": "33139" }, "token": "clv_1TSTSV3Cx7GEW4cwqo4ffYvf" }
What is causing the "Email ID is invalid" error? Are the form field names incorrect? I was using my personal email as the value for that field, so it was a real, valid email address that should not cause an error.
Thanks in advance!