#LuisEgusquiza

1 messages ยท Page 1 of 1 (latest)

calm mountainBOT
bitter wasp
wintry walrus
#

thank you.

And how could I integrate with a webview made in js? Could you please help me with that. It would be a direct webview in the application in flutte

bitter wasp
wintry walrus
#

And on the web, how would it be the best way to do it?

I try with an example in js. I would like to know if I am on the right track please.

#

:::::::

#

<head>
<title>Checkout</title>
<script src="https://js.stripe.com/v3/"></script>
</head>

<form id="payment-form">

</form>

<form id="confirmation-form">

</form>

<script>
// Initialize Stripe.js using your publishable key
const stripe = Stripe('{{$key}}');

const paymentMethodForm = document.getElementById('payment-method-form');
const confirmationForm = document.getElementById('confirmation-form');

// Calling this method will open the instant verification dialog.
stripe.collectBankAccountForPayment({
clientSecret: '{{$secret}}',
params: {
payment_method_type: 'us_bank_account',
payment_method_data: {
billing_details: {
name: "luis Egusquiza",
email: "email@email.com",
},
},
},
expand: ['payment_method'],
})
.then(({
paymentIntent,
error
}) => {

  //  console.error(paymentIntent);
   // console.error(error);
console.log(paymentIntent);

    if (error) {
        console.error(error.message);
        // PaymentMethod collection failed for some reason.
    } else if (paymentIntent.status === 'requires_payment_method') {
        // Customer canceled the hosted verification modal. Present them with other
        // payment method type options.
    } else if (paymentIntent.status === 'requires_confirmation') {
        // We collected an account - possibly instantly verified, but possibly
        // manually-entered. Display payment method details and mandate text
        // to the customer and confirm the intent once they accept
        // the mandate.
        //confirmationForm.show();
        //   console.log(paymentIntent);
    }
});

</script>

#

::::::

#

that is my code

#

๐Ÿ™

bitter wasp
#

Sorry we can't look at the whole code and say for sure that it would work. Our team on discord know nothing about how flutter's webview works. You may want to chat with flutter community to see if anyone has integrated this before.

wintry walrus
#

Yes I understand, thank you very much.

And how would it be on the web? Could you help me with that?

young patrol