Angular 使用ngx条带订阅
是否有人知道或了解如何向我解释ngx stripe如何进行订阅 我试着卷曲,但做不到 我可以做代币卡,但下一步怎么办 我有mi前端和Angular,后端和laravelAngular 使用ngx条带订阅,angular,laravel,stripe-payments,Angular,Laravel,Stripe Payments,是否有人知道或了解如何向我解释ngx stripe如何进行订阅 我试着卷曲,但做不到 我可以做代币卡,但下一步怎么办 我有mi前端和Angular,后端和laravel 我不知道我需要做代币,然后是客户,最后是订阅。但是我不知道怎么做,我已经阅读了文档,但是我仍然被卡住了在Stripe中创建订阅的主要步骤是: 创建条带客户(条带/出纳) 收取付款方式(ngx条带) 将付款方式保存给客户(条带/出纳) 创建订阅(条带/收银台) 您将只能在第二步(收集支付方法)中使用ngx stripe,并且可能在
我不知道我需要做代币,然后是客户,最后是订阅。但是我不知道怎么做,我已经阅读了文档,但是我仍然被卡住了在Stripe中创建订阅的主要步骤是:
this.stripeService.createToken
,而是调用this.stripeService.createPaymentMethod
:
this.stripeService
.createPaymentMethod({
type: 'card',
card: this.card.element,
billing_details: { name },
})
.subscribe((result) => {
if (result.paymentMethod) {
// Send the payment method to your server
console.log(result.paymentMethod.id);
} else if (result.error) {
// Error creating the token
console.log(result.error.message);
}
});
PaymentMethods是Stripe收集付款详细信息的较新建议路径
创建PaymentMethod后,您需要将PaymentMethod ID发送到服务器。在服务器中,您将创建一个客户并将PaymentMethod保存到该客户:
使用条纹
- (第三代码块)
这就是要点 在条带中创建订阅的主要步骤是:
this.stripeService.createToken
,而是调用this.stripeService.createPaymentMethod
:
this.stripeService
.createPaymentMethod({
type: 'card',
card: this.card.element,
billing_details: { name },
})
.subscribe((result) => {
if (result.paymentMethod) {
// Send the payment method to your server
console.log(result.paymentMethod.id);
} else if (result.error) {
// Error creating the token
console.log(result.error.message);
}
});
PaymentMethods是Stripe收集付款详细信息的较新建议路径
创建PaymentMethod后,您需要将PaymentMethod ID发送到服务器。在服务器中,您将创建一个客户并将PaymentMethod保存到该客户:
使用条纹
- (第三代码块)