mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-08 09:18:39 +01:00
Add proper endpoint for setting iDEAL default payment method.
This commit is contained in:
@@ -42,7 +42,8 @@ class StripeApi(
|
||||
private val CARD_YEAR_KEY = "card[exp_year]"
|
||||
private val CARD_CVC_KEY = "card[cvc]"
|
||||
|
||||
private const val RETURN_URL_3DS = "sgnlpay://3DS"
|
||||
const val RETURN_URL_SCHEME = "sgnlpay"
|
||||
private const val RETURN_URL_3DS = "$RETURN_URL_SCHEME://3DS"
|
||||
}
|
||||
|
||||
sealed class CreatePaymentIntentResult {
|
||||
|
||||
@@ -15,24 +15,5 @@ data class StripeSetupIntent @JsonCreator constructor(
|
||||
@JsonProperty("client_secret") val clientSecret: String,
|
||||
@JsonProperty("status") val status: StripeIntentStatus,
|
||||
@JsonProperty("payment_method") val paymentMethod: String?,
|
||||
@JsonProperty("customer") val customer: String?,
|
||||
@JsonProperty("latest_attempt") val latestAttempt: LatestAttempt?
|
||||
) {
|
||||
|
||||
fun requireGeneratedSepaDebit(): String = latestAttempt!!.paymentMethodDetails!!.ideal!!.generatedSepaDebit!!
|
||||
|
||||
@JsonIgnoreProperties
|
||||
data class LatestAttempt @JsonCreator constructor(
|
||||
@JsonProperty("payment_method_details") val paymentMethodDetails: PaymentMethodDetails?
|
||||
)
|
||||
|
||||
@JsonIgnoreProperties
|
||||
data class PaymentMethodDetails @JsonCreator constructor(
|
||||
@JsonProperty("ideal") val ideal: Ideal?
|
||||
)
|
||||
|
||||
@JsonIgnoreProperties
|
||||
data class Ideal @JsonCreator constructor(
|
||||
@JsonProperty("generated_sepa_debit") val generatedSepaDebit: String?
|
||||
)
|
||||
}
|
||||
@JsonProperty("customer") val customer: String?
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user