stripe / stripe-ios

Stripe iOS SDK
https://stripe.com
MIT License
2.12k stars 981 forks source link

STPPaymentOptionsViewController allows adding duplicate cards #1728

Closed dhruvsbhatt closed 3 years ago

dhruvsbhatt commented 3 years ago

During checkout process, I first use STPPaymentOptionsViewController to add card. But it also allows to save same cards thus making duplicate entries.

Summary

Code to reproduce

self.paymentContext.pushPaymentOptionsViewController()

iOS version

iOS 14.0

Installation method

Via cocoapods

SDK version

Stripe 21.1.0

Other information

Screen Shot 2020-12-08 at 6 26 18 PM

aliriaz-stripe commented 3 years ago

@dhruvsbhatt hello!

STPPaymentOptionsViewController doesn't de-duplicate any cards by default so this is expected that it will add duplicate cards.

Closing as it isn't a bug in the SDK, please let me know if you have questions/suggestions!

dhruvsbhatt commented 3 years ago

@aliriaz-stripe Thanks for confirming, wouldn't it be helpful to provide a way to handle it if STPPaymentOptionsViewController doesn't de-duplicate any cards by default ?