#harolold-element-link
1 messages · Page 1 of 1 (latest)
You can hide that field when creating your PaymentElement https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-email
And then pass it in when confirming the intent https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-email
Can you send me the text of your code where you create the element? I'll put it in my page and see if I have the same thing
Just the first snippet was good but thanks for the additional code. Apologies server was busy, I am testing this now and will get back to you
thank you so much
Having trouble reproducing this, the Payment Element is hiding that field for me. Trying to think of what the difference may be
I'll try in a different browser
hmm still having it
is there something wrong with my html?
@Need to make this responsive with flex?@
@Pass in redirect url as a query parameter ?redirectUrl="https://...."@
<!-- Display a payment form -->
<form id="payment-form" data-product-id="price_1NOROuDNrxNFSI5IQBXytvEs" data-success-url="@ViewBag.redirectUrl">
@* Debug with localhost with visual studio multiple startup projects*@
@<form id="payment-form" data-product-id="price_1NOROuDNrxNFSI5IQBXytvEs" data-success-url="https://localhost:7113/account/step2">@
<p class="small_text">
Step 1 of 2
</p>
<h2 style="font-weight: normal;">Enter payment</h2>
<p>Start FREE 14 Day Trial<br />
Only $197/mo after, cancel at any time</p>
<hr />
<div id="link-authentication-element">
<!--Stripe.js injects the Link Authentication Element-->
</div>
<div id="payment-element">
<!--Stripe.js injects the Payment Element-->
</div>
<button id="submit">
<div class="spinner hidden" id="spinner"></div>
<span id="button-text">Pay now</span>
</button>
<div id="payment-message" class="hidden"></div>
</form>
@section Scripts{
<script>
//function getSuccessURL(path) {
// var baseurl = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/";
// //var redirect_url = baseurl + "Home/Privacy";
// return baseurl + path;
//}
//var form_element = document.getElementById("payment-form");
////Enter the next url to go to on confirmation/success here:
//var url_to_redirect_on_success = getSuccessURL("Home/Privacy");
//form_element.setAttribute("data-success-url", url_to_redirect_on_success);
</script>
}
it's very barebones
I don't think it is an issue with the rest of your page. This should only be based on the Stripe.js code. Still trying to figure this out and reproduce on my side.
I did a billingDetails: 'never' and that still showed my email
but took out zipcode and country
Thanks for testing. That is good to know . As far as I know these settings should only apply to the exact field that they are set for so I am surprised that the element is acting like this.
Wait, isn't this email field the link Authentication Element? Apologies I somehow skimmed over that both places in your code but collecting an email is one of the primary uses for that element https://stripe.com/docs/payments/elements/link-authentication-element
harolold-element-link