@yingzhixiaoyi/stripe
v0.0.1
Published
Stripe PaymentElement browser runtime with explicit host delegation
Readme
@yingzhixiaoyi/stripe
Stripe.js PaymentElement 的无框架浏览器运行时。
能力边界
负责官方脚本加载、PaymentElement 生命周期、支付确认、取消清理和 standalone/Wujie delegate。
不负责创建订单、PaymentIntent、金额计算、webhook、Wujie bus、Vue UI 或结果持久化。
import { requestStripePayment } from '@yingzhixiaoyi/stripe'
requestStripePayment({
requestId: crypto.randomUUID(),
publishablekey,
clientsecret,
amount: 12.5,
delegateToMain: payload => bus.toMain('stripe-pay-open', payload),
onReply: result => handlePaymentResult(result),
})支付成功必须由服务端订单/webhook再次确认;前端回调不能单独作为发货依据。
