#Shivam Kumar

1 messages · Page 1 of 1 (latest)

balmy cargoBOT
bleak compass
river cypress
#

seti_1MWG5WJ3dxAQpMxWGQ7ORaGD

#

if($request->setup_intent_id){
$stripe->setupIntents->confirm(
$request->setup_intent_id
);
}

#

this error when i confirm setupIntents

bleak compass
#

What do you want to achieve exactly ? collecting and saving ACH Debit for a customer using Stripe Elements ?

river cypress
#

yes this is my frontend code

#

var paymentIntent = response.paymentIntent;
stripe.collectBankAccountForSetup({
clientSecret : paymentIntent.client_secret,
params: {
payment_method_type: 'us_bank_account',
payment_method_data: {
billing_details: {name: 'Jenny Rosen', email: 'jenny@example.com'},
},
},
expand: ['payment_method'],
}) .then(({setupIntent, error}) => {

                        if (error) {
                        console.error(error.message);
                        // PaymentMethod collection failed for some reason.
                        } else if (setupIntent.status === 'requires_payment_method') {
                        console.log('cancel');
                        } else if (setupIntent.status === 'requires_confirmation') {
                        console.log("payment setup successfully");
                        console.log(setupIntent.id);
                        $.ajax({
                            url: '{{url('account/bank/addStripeBank')}}',
                            type: 'post',
                            data: { setup_intent_id: setupIntent.id },
                            headers: {
                                'X-CSRF-TOKEN': csrf_token,
                            },
                        })
                        }
                    });
bleak compass
#

Yes I see,

river cypress
#

yes A to Z i follow this guide

bleak compass
river cypress
#

ok when i add bank then i want to confirm setup
else if (setupIntent.status === 'requires_confirmation') {
console.log("payment setup successfully");
console.log(setupIntent.id);
$.ajax({
url: '{{url('account/bank/addStripeBank')}}',
type: 'post',
data: { setup_intent_id: setupIntent.id },
headers: {
'X-CSRF-TOKEN': csrf_token,
},
})
using this code

#

i hit ajax run this function in backend
if($request->setup_intent_id){
$stripe->setupIntents->confirm(
$request->setup_intent_id
);
}

#

but i am getting this error "message": "Missing required param: mandate_data.",

#

please help me i don't find any solution for this error

bleak compass
#

remove that call, and continue collecting the mandate (step 5)

river cypress
#

i am facing this error
Uncaught (in promise) TypeError: confirmationForm.show is not a function

#

var confirmationForm = document.getElementById('confirmation-form');

#

<div id="confirmation-form">
</div>

bleak compass
#

This is a Javascript error, like there is no element with that id in your DOM

river cypress
#

i created this <div id="confirmation-form">
</div>

#

then why i am getting this error

bleak compass