我已经集成了条带支付模块在我的角度应用程序。当我运行这个应用程序时,它显示了下面的错误。
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://js.stripe.com') does not match the recipient window's origin ('http://localhost:4200').
对此有什么解决方案吗?
我们正在为我们的客户的订阅使用条带支付处理。当用户更改计划时,我们希望立即向他们收取按比例计算的差额。当计划具有不同的计费间隔时,条带会自动执行此操作,但当在具有相同间隔的计划之间进行更改时,条带会将付款推迟到下一个计费期间。
我们现在的处理方式是在更新订阅后创建发票,但如果它的计费失败,我们需要进行回滚。
stripe.subscriptions.update(/* change plan */);
if (plans_have_different_billing_intervals) {
try {
stripe.invoices.create(/* for all pendi