Stripe Checkout https://checkout.stripe.com/checkout.js 和 Elements https://js.stripe.com/v3/之间的区别 [英] Difference between Stripe Checkout https://checkout.stripe.com/checkout.js and Elements https://js.stripe.com/v3/
问题描述
我正在使用条带支付与我的系统集成.但我不明白这两个库之间的区别.
似乎使用 javascript 生成表单并将令牌传递给我们的服务器端.
这是与 .net core 一起使用
<script src="//checkout.stripe.com/v2/checkout.js"类=条纹按钮"数据键="@Stripe.Value.PublishableKey"数据区域设置=自动"data-description="样品费用"数据量=500">
没有 checkout.js,我们也使用
<div id="payment-request-button"><!-- 将在此处插入条纹元素.-->
这意味着我也可以使用这个 2 来使用.而这个脚本中的两个,我可以处理 crate 令牌和自定义,那么这两个脚本的行为有何不同.
非常感谢
没有区别.您应该使用 Stripe 的 结帐文档页面 上列出的 URL:https://checkout.stripe.com/checkout.js
.
您可以选择使用 Checkout 还是 Elements 用于收集和标记客户付款数据.结帐是一种可立即使用的预先构建的表单.如果您想设计自己的自定义付款表单,则应改用 Elements.
I am using stripe payment to integrate with my system. But i did not understand a difference between this 2 library.
It's seem use javascript to generate the form and pass the token to our server side.
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="pk_test_6pRNASCoBOKtIshFeQd4XMUh"
data-amount="2000"
data-name="Stripe.com"
data-description="2 widgets"
data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
data-locale="auto"
data-zip-code="true">
</script>
And this is using with .net core
<script src="//checkout.stripe.com/v2/checkout.js"
class="stripe-button"
data-key="@Stripe.Value.PublishableKey"
data-locale="auto"
data-description="Sample Charge"
data-amount="500">
</script>
With out checkout.js, we also use
<script src="https://js.stripe.com/v3/"></script>
<div id="payment-request-button">
<!-- A Stripe Element will be inserted here. -->
</div>
That mean i can also use this 2 to use. And two of this script , i can handle crate token and custom, so what is the difference behavior of this 2 scripts.
Thank you very much
There is no difference. You should use the URL listed on Stripe's Checkout documentation page: https://checkout.stripe.com/checkout.js
.
EDIT: It's up to you to choose whether to use Checkout or Elements to collect and tokenize customer payment data. Checkout is a pre-built form that is usable immediately. If you want to design your own custom payment form, you should use Elements instead.
这篇关于Stripe Checkout https://checkout.stripe.com/checkout.js 和 Elements https://js.stripe.com/v3/之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!