You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirming a Mandate works differently to Android SDK.
Issue 1:
Why do we need the customer ephemeral key at this point? For bank mandates it's not even required for the PaymentLauncher on Android.
Issue 2
The main issue is that your version of STPCustomerContext requires the raw json vs the actual key on android:
Can we omit the whole STPPaymentContext or at least only pass through just the Key so I don't have to completely change a bankend call when creating a setup intent.
let setupIntentParams = STPSetupIntentConfirmParams(
clientSecret: stripeSetupIntentResponse.clientSecret,
paymentMethodType: .USBankAccount
)
let paymentContext = STPPaymentContext(
customerContext: STPCustomerContext(
keyProvider: MyCustomerEphemeralKeyProvider(
customerKey: stripeSetupIntentResponse.ephemeralKey!
)
)
)
return await withCheckedContinuation { continuation in
STPPaymentHandler.shared().confirmSetupIntent(
setupIntentParams, with: paymentContext
) { (status, intent, error) in
if(error != nil) {
return continuation.resume(returning: AddPaymentMethodResult.Failed(
error: KotlinThrowable(message: error?.localizedDescription))
)
}
switch status {
case .failed:
continuation.resume(returning: AddPaymentMethodResult.Failed(error: KotlinError()))
case .canceled:
continuation.resume(returning: AddPaymentMethodResult.Canceled())
case .succeeded:
continuation.resume(returning: AddPaymentMethodResult.Completed())
@unknown default:
fatalError()
}
}
}
iOS version
15+
Installation method
Pods
SDK version
22.36
Other information
Thirdly why are your SDK so far apart and inconsistant, iOS and Android basically work the same these days, it's not great they work completely differently.
The text was updated successfully, but these errors were encountered:
PaymentLauncher is more similar to STPPaymentHandler on iOS.
Issue 2
The main issue is that your version of STPCustomerContext requires the raw json vs the actual key on android:
Can we omit the whole STPPaymentContext or at least only pass through just the Key so I don't have to completely change a bankend call when creating a setup intent.
You do not need to pass in a STPCustomerContext to confirm a SetupIntent, you simply just need to pass in a type that conforms to STPAuthenticationContext.
publicfunc confirmSetupIntent(
_ setupIntentConfirmParams:STPSetupIntentConfirmParams,
with authenticationContext:STPAuthenticationContext,
completion:@escapingSTPPaymentHandlerActionSetupIntentCompletionBlock)
Thirdly why are your SDK so far apart and inconsistant, iOS and Android basically work the same these days, it's not great they work completely differently.
Could you elaborate further? Based on my replies above, the functionality is largely the same. Some names are different, but overall functionality and set of available APIs is similar.
Additionally, you mention you are on version 22.36, but we have not published a version 22.36 of the iOS SDK, which version are you on? It is recommended to be on the latest version.
Summary
Confirming a Mandate works differently to Android SDK.
Issue 1:
Why do we need the customer ephemeral key at this point? For bank mandates it's not even required for the PaymentLauncher on Android.
Issue 2
The main issue is that your version of STPCustomerContext requires the raw json vs the actual key on android:
Can we omit the whole STPPaymentContext or at least only pass through just the Key so I don't have to completely change a bankend call when creating a setup intent.
iOS version
15+
Installation method
Pods
SDK version
22.36
Other information
Thirdly why are your SDK so far apart and inconsistant, iOS and Android basically work the same these days, it's not great they work completely differently.
The text was updated successfully, but these errors were encountered: