#GiovanniV - Payment Sheet Error
1 messages ยท Page 1 of 1 (latest)
I'm using Stripe 22.6.0.
var paymentConfiguration = PaymentSheet.Configuration()
paymentConfiguration.merchantDisplayName = "xxxx"
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
Hey @spare ore ๐ I asked you about which exact doc you were following last time and you just gave us a slack link
do you have more details here? This looks like the exact same question as last time with no extra information
Yes, if you look at that doc and my code.
They're basically exactly the same.
Only difference being the setup payment intent API call cause it's obviously different endpoints.
following this https://stripe.com/docs/payments/quickstart?platform=ios
as you recomended
PaymentSheet.CustomerConfiguration I don't see this anywhere in that guide but I see ``` var configuration = PaymentSheet.Configuration()
configuration.merchantDisplayName = "Example, Inc."
let paymentSheet = PaymentSheet(
paymentIntentClientSecret: paymentIntentClientSecret,
configuration: configuration)``` for example
are we looking at different docs?
let me check
Are you an experienced iOS developer too or just piecing things around? No judgment here, I'm not a good iOS developer but that will help me grasp the situation
There are minor differences like merchantDisplayName is "XXXX" and extra configuration for appearance, but it's the same code.
The other difference is I'm not using paymentIntent constructor because I'm just adding a payment method. I'm not trying to actually make a payment.
var paymentConfiguration = PaymentSheet.Configuration()
paymentConfiguration.merchantDisplayName = "XXXX"
paymentConfiguration.allowsDelayedPaymentMethods = true
paymentConfiguration.apiClient.publishableKey = stripeAPIKey
It's there in my code.
I don't really follow you, you share a doc that does look qite different. For example let paymentSheet = PaymentSheet( paymentIntentClientSecret: paymentIntentClientSecret, configuration: configuration) this is how you pass the secret, your code is completely different (and about setupIntent which is not that doc?)
I'm trying to figure out what doc you are really following
the flow is setup_intent, not payment_intent
https://stripe.com/docs/payments/save-and-reuse?platform=ios&ui=payment-sheet Can you look at that specific doc?
OK I think I have a mix of APIs I will check and get back to you guys I appreciate all your help
sure thing! start with that new doc