概述SPC 通过已注册的 FIDO 凭据在结算流程中进行强认证,配合 Payment Request 提供一致的用户体验与安全性。用法/示例const method = [{ supportedMethods: 'secure-payment-confirmation', data: { rpId: location.hostname, challenge: new Uint8Array([1,2,3]), instrument: { displayName: 'Card **** 4242', icon: 'https://example.com/icon.png' }, payeeOrigin: 'https://merchant.example' } }] const details = { total: { label: '总计', amount: { currency: 'CNY', value: '99.00' } } } const req = new PaymentRequest(method, details) const resp = await req.show() await resp.complete('success') 工程建议与身份与风险控制系统集成,校验返回 token 与支付状态;设计失败回退到常规支付路径。明确支持与平台差异,验证浏览器与设备矩阵;在不支持环境降级到普通 Payment Request 或表单。合规与隐私治理,确保用户同意与最小数据原则。参考与验证web.dev:Secure Payment Confirmation — https://web.dev/articles/secure-payment-confirmationW3C:SPC — https://www.w3.org/TR/secure-payment-confirmation/

发表评论 取消回复