#0Bietnua-STPPaymentContext-iOS
1 messages ยท Page 1 of 1 (latest)
Hi
Hello ๐
If I build UI by myself
include payment list
so right now I can't use STPPaymentContext right?
because no selectedPaymentOption in STPPaymentContext
Mean that I don't use STPPaymentOptionsViewController anymore
I am not sure as I don't have the full context on this
Did you speak to someone earlier? I can catch up on your previous thread
no, this is first time
I create pm context by this
self.paymentContext = STPPaymentContext(customerContext: customerContext,
configuration: config,
theme: theme)
but I don't know how to attach any payment method to current payment context
ah okay.
Let me take a look and give me a few as I haven't used my iOS skills in a while ๐
Thank you. I hope I can use STPPaymentContext manually without opening STPPaymentOptionsViewController
Thank you
Have you tried setting the defaultPaymentMethod? https://stripe.dev/stripe-ios/docs/Classes/STPPaymentContext.html#/c:@M@Stripe@objc(cs)STPPaymentContext(py)defaultPaymentMethod
Did you call retryLoading after setting it?
let me try
oh it works
amazing haha
I didn't call retryLoading before
Thank you
Great to hear that that fixed it! I was still booting up my XCode project to test
Nice! I am still on 13.2 but I will make sure to upgrade as soon as possible.