-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose init(stripeId:)
on STPPaymentMethod
#1729
Comments
We are running into this problem as well which is causing our app to not compile anymore. Do you have any tips or advice? We only upgraded to reduce the size of the overall SDK for our App Clip integration and now we seem to be blocked. In our case, when we initialize the STPPaymentMethod, we are getting this error: Here is our example code which was working previously:
|
Hi @MikeAttia and @ahmadfs, Thanks for the report, I understand the issue. Sorry about this! We'll expose the correct API to use in the next release. In the mean time, as a super hacky workaround, I think you could use
to initialize a STPPaymentMethod for your purposes. |
@yuki-stripe : Thank you for the reply but I don't believe your suggestion would help us. In our case we were getting the new selected payment method from the STPPaymentOptionsViewController delegate. So we don't know the payment id. This in line with Stripe's guidance here: https://stripe.com/docs/mobile/ios/basic. |
@ahmadfs Can you use the |
@yuki-stripe : We were able to work around the problem. Thank you for the tips. |
This was added in version 21.2.0. |
@davidme-stripe I think this issue was not resolved still in 21.2.0. the Please check link to the method in code https://github.com/stripe/stripe-ios/blob/master/Stripe/STPPaymentMethod.swift#L173 |
Hi! Sorry about that, I should have linked to the change in my comment. We have new functions on You should use |
Summary
After updating to the swift SDK v 21.1.0, I have a problem initialising
STPPaymentMethod
with a stripe Id in order to pass it todetachPaymentMethod(fromCustomer: completion:)
in order to remove SEPA payment method from user account.Code to reproduce
When customer desires to remove a SEPA payment method, I need to call
detachPaymentMethod(fromCustomer: completion:)
on the customer context object, which takes aSTPPaymentMethod
as a parameter. but I can't create one using only a stripe ID.iOS version
we support iOS 11.0 and above
Installation method
pull SDK using Cocoapods
SDK version
21.1.0
Other information
The text was updated successfully, but these errors were encountered: