For example, if we get the `expired_card` error code back from Stripe, we should show a specific error to the user. This introduces some TODOs around error messages in a couple of spots. We will revisit this when implementing PayPal monthly donations, as is explained in the comments. I tested this by using some of [Stripe's test numbers][0] (as well as automated tests). [0]: https://stripe.com/docs/testing#declined-payments
13 lines
206 B
Swift
13 lines
206 B
Swift
//
|
|
// Copyright 2022 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension Stripe {
|
|
public struct StripeError: Error {
|
|
public let code: String
|
|
}
|
|
}
|