#surprisedpika9217

1 messages · Page 1 of 1 (latest)

runic martenBOT
dusty canyon
#

What UI are you using for accepting payments?

smoky kestrel
#

Hi, could you help me elaborate with what you mean with UI?

dusty canyon
#

User interface

smoky kestrel
#

Let me make a screenshot of how it currently is

#

Im testing on another phone, so sorry for the quality

#

Though credit card also should be a choice, it is not deviating away from this option

dusty canyon
smoky kestrel
#

Yes we do

dusty canyon
#

Do you have an example Payment Intent ID I can look at that was used to display the UI?

smoky kestrel
#

For sure, I can show u the code that we use to make the payment

dusty canyon
#

Just the ID of the Payment Intent is fine

smoky kestrel
#

Good question, where can I find this...

#

Im still new to Stripe sorry

dusty canyon
#

You should be creating it in order to display the UI in your screenshot above

smoky kestrel
#

So I initialize the payment, await Stripe.instance
.initPaymentSheet(), then I display the UI here:
Stripe.instance.presentPaymentSheet()

dusty canyon
#

You don't pass a client secret to display it?

smoky kestrel
#

Oh yes I do, which is here:

await Stripe.instance
.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
paymentIntentClientSecret: paymentIntent![
'client_secret'], //Gotten from payment intent
style: ThemeMode.dark,
googlePay: gpay,
// applePay: applePay,
merchantDisplayName: widget.restaurant.franchise))
.then((value) {});

#

the paymentIntent one

dusty canyon
#

okay, so I need to see an example Payment Intent that you create in this manner. Can you add a log line console.log(); and go through the flow then send me the ID?

smoky kestrel
#

the ID of paymentIntent!['client_secret']?

dusty canyon
#

No, the ID of paymentIntent[id]

smoky kestrel
#

gotcha, one moment

#

Sorry for the delay, I think theres somehow good news suddenly

#

they all suddenly appear but I dont know why

dusty canyon
#

Glad to hear it's working

smoky kestrel
#

Ye youre a lucky charm

#

I do have 2 followed up questions about this

#
  1. If user pays once, will the behaviour be recorded? (Like name, selected bank etc)
  2. If we have connected accounts, how can we pass the account such that they can decide which payment to show?
dusty canyon
#

I think those are better questions for our support folks. We handle mostly just developer integration questions: https://support.stripe.com/contact

smoky kestrel
#

I actually went to them, but they couldnt help me with flutter

#

hence why I went to discord

dusty canyon
#

Sure, but none of these questions are about Flutter.

smoky kestrel
#

the first one not, but second one I need to integrate into the code

#

the parameters are not to be found

dusty canyon
#

How are you choosing which payment methods types to show right now?

smoky kestrel
#

its showing everything, I cant decide to select a specific one, which was my initial question actually

dusty canyon
#

Alternatively, you can let it default to the Payment Method types you have enabled in the Dashboard

#

Which is what it's doing right now

smoky kestrel
#

I found the link, but how to implement in flutter is a bit of mystery

#

I will try to do some more research, thanks