简体   繁体   English

条带元素不接受信用卡输入

[英]Stripe Elements Not accepting Credit Card Input

I am trying to use some Stripe Elements to input Credit Card details. 我正在尝试使用一些Stripe Elements输入信用卡详细信息。 am currently using Laravel hosted with Valet. 目前正在使用代客托管的Laravel。 I understand that Stripe requires to have HTTPS set up. 我了解Stripe需要设置HTTPS。 I have run the Valet secure command and can see the website is serving via HTTPS. 我已经运行了Valet secure命令,可以看到该网站正在通过HTTPS服务。

For some reason I am not able to enter any Credit card information into the element stripe has provided. 由于某种原因,我无法在提供的元素条中输入任何信用卡信息。 When I have used the same Code as provided from the Stripe website it works fine in JSfiddle but not let me input on my valet server. 当我使用与Stripe网站提供的相同的代码时,它在JSfiddle中可以正常工作,但不允许我在代客服务器上输入。

Is it possiable that stripe is not letting me do this because my TLS certificate is not verified by Digitrust or a similar company? 条纹是否有可能因为我的TLS证书未经过Digitrust或类似公司的验证而不允许我这样做? If so, how would I go about working around this while I'm using valet i'm my localhost. 如果是这样,当我使用代客我是我的本地主机时,我将如何解决此问题。

Any help or guidance would be great, I can't see where I am going wrong here. 任何帮助或指导都将非常有用,在这里我看不到哪里出了问题。

The examples I have tried are simply from 我尝试过的示例仅来自

https://stripe.com/docs/elements/examples https://stripe.com/docs/elements/examples

JSFiddle of working example that won't allow me to enter Input on the credit card field JSF工作示例中间例,不允许我在“信用卡”字段上输入“输入”

https://jsfiddle.net/w4s8z4kd/ https://jsfiddle.net/w4s8z4kd/

<script src="https://js.stripe.com/v3/"></script>
<form>
<div class="group">
<label>
<span>Name</span>
<input name="cardholder-name" class="field" placeholder="Jane Doe" />
</label>
<label>
<span>Phone</span>
<input class="field" placeholder="(123) 456-7890" type="tel" />
</label>
</div>
<div class="group">
<label>
<span>Card</span>
<div id="card-element" class="field"></div>
</label>
</div>
<button type="submit">Pay $25</button>
<div class="outcome">
<div class="error"></div>
<div class="success">
Success! Your Stripe token is <span class="token"></span>
</div>
</div>
</form>

At this stage I beleieve my JS and CSS is correct, have simply copied it from the examples page and confirmed JS working with a simple Alert test. 在此阶段,我相信我的JS和CSS是正确的,只需从示例页面复制它,并确认JS使用简单的Alert测试即可。

Thanks Again! 再次感谢!

Sorry, I overlooked the order of My Javascript. 抱歉,我忽略了My Javascript的顺序。 God dammit 可恶

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM