FIX: Payments could not complete (#28)
Due to putting the Stripe Elements HTML inside an if block in the template, this caused state to be funky. As a result, calling `this.stripe.createToken` failed to return a promise. Opted instead to hide the elements via CSS for anonymous users to prevent this showstopping bug.
This commit is contained in:
parent
1ad5b17640
commit
b950926538
|
@ -26,12 +26,13 @@
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
{{subscribe-card cardElement=cardElement}}
|
||||||
|
|
||||||
{{#if loading}}
|
{{#if loading}}
|
||||||
{{loading-spinner}}
|
{{loading-spinner}}
|
||||||
{{else if isAnonymous}}
|
{{else if isAnonymous}}
|
||||||
{{login-required}}
|
{{login-required}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{subscribe-card cardElement=cardElement}}
|
|
||||||
|
|
||||||
{{d-button
|
{{d-button
|
||||||
disabled=loading
|
disabled=loading
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.anon #card-element {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.StripeElement {
|
.StripeElement {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue