mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Update payment method request with email.
This commit is contained in:
committed by
Cody Henthorne
parent
8aea20f147
commit
14aecc4684
@@ -96,11 +96,16 @@ class StripeApi(
|
||||
|
||||
private fun createPaymentMethod(paymentSource: PaymentSource): Response {
|
||||
val tokenizationData = paymentSource.parameterize()
|
||||
val parameters = mapOf(
|
||||
val parameters = mutableMapOf(
|
||||
"card[token]" to JSONObject((tokenizationData.get("token") as String).replace("\n", "")).getString("id"),
|
||||
"type" to "card"
|
||||
"type" to "card",
|
||||
)
|
||||
|
||||
val email = paymentSource.email()
|
||||
if (email != null) {
|
||||
parameters["billing_details[email]"] = email
|
||||
}
|
||||
|
||||
return postForm("payment_methods", parameters)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user