收银员在添加付款方式时抛出错误 "A parameter provided in the URL (payment_method) was repeated as a GET or POST parameter."

Cashier throws error "A parameter provided in the URL (payment_method) was repeated as a GET or POST parameter." while adding payment method

我在 laravel 7 中使用 cashier for stripe,在添加付款方式时遇到此错误。 URL (payment_method) 中提供的参数作为 GET 或 POST 参数重复。您只能将此信息作为 URL. 的一部分提供 我像这样将付款意向传递给 blade, 'intent' => $user->createSetupIntent() 在 js 中,

cardButton.addEventListener('click', async (e) => {
    e.preventDefault();
    const { setupIntent, error } = await stripe.confirmCardSetup(
        clientSecret, {
            payment_method: {
                card: cardElement,
                billing_details: { name: cardHolderName.value }
            }
        }
    );

    if (error) {

        // Display "error.message" to the user...
    } else {
        send('save', false, {
            data: {
                payment_method: setupIntent
            }

        });
        // The card has been verified successfully...
    }
});

然后添加

 $paymentMethod=$request['payment_method'];
        $user->updateDefaultPaymentMethod($paymentMethod);

谁能帮我找出问题所在。

这是我这边的错,我在 updateDefaultPaymentMethod 中传递了完整的设置意图而不是付款方式。 我需要将数据设置为 payment_method: setupIntent.payment_method