【问题标题】:Laravel Cashier 3D Secure/SCA issue stripeLaravel Cashier 3D Secure/SCA 问题条
【发布时间】:2020-01-16 17:44:18
【问题描述】:

在我们的网站上使用 laravel 收银机集成条带系统后,我用测试卡进行了测试,成功的卡很少,失败的也很少。我已尝试适应 3D 安全/SCA。所以问题是, 4000003800000446、4000002500003155 和 4000000000003055 是成功的,而 4000000000003220 和 4000002760003184 是卡片之间的失败,返回不完整状态。我的系统是用于杂志的年度订阅。我确实收到弹出窗口,敦促我确认身份验证,如图confirmation popup screenshot 所示,在我确认后,它会重定向到我的用于创建订阅的代码,即



    $payement_intent = $request->get('intent');
                $plan_key = 'plan_*******';
                try{
                    $payement_info = $subscriber->newSubscription('yearly', $plan_key)->create($payement_intent, [
                        'email'=>$subscriber->email
                    ]);                
                }catch(IncompletePayment $e){
                    dd($e);
                    Session::flash('message', 'Payment is incomplete. Extra verification is needed. You will receive an email with further payment confirmation instructions.');
                    return redirect()->to(route('acc_success')); 
                }

因为我已经放弃了不完整的付款,所以例外的屏幕截图是enter image description here。我很困惑,因为我在弹出窗口上单击了完整的身份验证是不是假设验证 3D 身份验证并成功付款,或者我错过了一些关于收银员不完整状态的内容,因为条纹文档说“订阅仅在以下情况下进入不完整状态尝试第一次充电失败或需要 SCA。”

【问题讨论】:

    标签: php laravel stripe-payments payment-gateway laravel-cashier


    【解决方案1】:

    您使用的两张卡是3DS2 卡,需要对交易进行身份验证。 incomplete 状态要求您要求您的客户完成 3DS 流程以授权交易。您可以关注https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-1-handling-sca 来执行此操作。

    基本上,如果订阅处于incomplete 状态,您将需要检查subscription.latest_invoice.payment_intent 状态。 它将在require_action 中,因为这些卡需要身份验证,尤其是为测试这些场景而设计的这两张测试卡。 在这种情况下,您只需将subscription.latest_invoice.payment_intent.client_secret 传递给前端并调用handleCardPayment 以显示3DS 模态供您的客户完成授权。

    【讨论】:

    • 是否可以在服务器端进行收费而不将其发送到前端?大部分客户端将关闭会话。我在考虑商家发起的交易
    猜你喜欢
    • 2021-06-17
    • 2022-01-03
    • 1970-01-01
    • 2019-07-04
    • 2021-04-22
    • 2020-12-02
    • 2018-07-26
    • 2020-11-09
    • 2022-08-02
    相关资源
    最近更新 更多