Stripe not allowing spaces at end of Email
-
Recently Stripe has not been allowing spaces at end of email addresses. This plugin needs to trim the space at the end of emails before passing it on to stripe.
"error": { "type": "invalid_request_error", "message": "Invalid email address: [email protected] ", "param": "owner[email]" }
As you can see after .com is a space which shouldn’t be there.
For anyone else having this issue put the following code at the bottom of your checkout page and be sure to select the text tab (not visual tab) since it’s javascript.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script>var x = document.getElementById("customer_details"); x.addEventListener("blur", RemoveBillEmailSpace, true); function RemoveBillEmailSpace() { document.getElementById("billing_email").value = document.getElementById("billing_email").value.replace(/^\s+|\s+$/g, ""); $('#billing_email').trigger("change"); }</script>
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Stripe not allowing spaces at end of Email’ is closed to new replies.