移动支付
要使用Headless checkout接受移动支付:
- 添加面向移动系统支付的
show_mobile_payment_screen
事件处理。
示例:
Copy
- typescript
headlessCheckout.form.onNextAction((nextAction) => {
switch (nextAction.type) {
case 'show_mobile_payment_screen': {
this.showSecondStep = true;
}
}
});
- 添加
psdk-submit-button
组件以在支付步骤的第二步中添加按钮。
示例:
Copy
- html
@if (showSecondStep) {
<psdk-submit-button text="Show status"></psdk-submit-button>
}
本文对您的有帮助吗?
感谢您的反馈!
我们会查看您的留言并运用它改进用户体验。发现了错别字或其他内容错误? 请选择文本,然后按Ctrl+Enter。