#giovanni-paymentsheet-error

1 messages · Page 1 of 1 (latest)

sharp sorrel
#

@jaunty river can you share your exact code + exact version of the iOS SDK you are using?

jaunty river
#

var paymentConfiguration = PaymentSheet.Configuration()
paymentConfiguration.merchantDisplayName = "XXX"
paymentConfiguration.allowsDelayedPaymentMethods = true
paymentConfiguration.apiClient.publishableKey = stripeAPIKey

            paymentConfiguration.appearance.colors.background = DesignSystem.background
            paymentConfiguration.appearance.colors.componentBackground = DesignSystem.ctaBackground
            paymentConfiguration.appearance.colors.text = DesignSystem.text
            paymentConfiguration.appearance.colors.textSecondary = DesignSystem.secondaryText
            paymentConfiguration.appearance.colors.primary = DesignSystem.digitalBlue
            paymentConfiguration.appearance.cornerRadius = 12

            paymentConfiguration.customer = PaymentSheet.CustomerConfiguration(id: $0.customer_id, ephemeralKeySecret: $0.ephemeral_key)

            self.paymentSheet = PaymentSheet(setupIntentClientSecret: $0.client_secret, configuration: paymentConfiguration)
            self.paymentSheet?.present(from: presenter) { paymentSheetResult in
#

I'm using Stripe 22.6.0.

sharp sorrel
#

which guide are you following exactly?

jaunty river
#

1 min I am getting that guide . 1 more thing on web, once a consumer vaults a card, it appears that it is necessary to redirect the customer to a new landing page (which would then make it cumbersome to ensure that we are keeping them within the reservation booking flow.) can you confirm that this redirect is absoltuely necessary or if there is some way around it?

sharp sorrel
#

Hard to say without more details really, there are dozens of ways to integrate Stripe. I need to know exactly what you are referring to.
But taking a wild guess: PaymentElement redirects by default after confirmation. This is crucial for non card payments which often require a redirect to a partner's website/app for example.
If you only accept card payments (mistake though long term) then you can use redirect: 'if_required' to avoid the redirect: https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect

jaunty river
#

OK that makes sense I will look into that document and for the other question here's the version guide I'm using

sharp sorrel
#

that seems like an internal Slack message to your own org maybe? I'm not going to click on this but that's not an official Stripe guide/doc

sharp sorrel
#

that's not really a tutorail or a guide, that's a specific line of code

#

You're the developer, what exact Stripe doc are you following? If none, why?

jaunty river
#

oh.. ok yes The above is what I'm using as reference. what guide doc you recommend for me to follow ?

#

was following that ExampleCheckoutViewController.swif

blazing plover