-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BANKCON-14531] Update Instant Debits flow to call /share
endpoint for Panther payments
#4063
[BANKCON-14531] Update Instant Debits flow to call /share
endpoint for Panther payments
#4063
Conversation
with closure: @escaping (Value) throws -> T | ||
) -> Future<T> { | ||
chained { value in | ||
chained(on: queue) { value in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive-by cleanup of this recently merged method!
let parameters: [String: Any] = [ | ||
"request_surface": requestSurface, | ||
"id": paymentDetailsId, | ||
"credentials": [ | ||
"consumer_session_client_secret": consumerSessionClientSecret | ||
], | ||
"expected_payment_method_type": expectedPaymentMethodType, | ||
"expand": ["payment_method"], | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consumerSessionClientSecret: consumerSession.clientSecret, | ||
paymentDetailsId: paymentDetails.redactedPaymentDetails.id | ||
) | ||
.transformed { $0 as PaymentMethodIDProvider } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where we get to use that new type-erasure API!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good from a Link Card Brand perspective!
cf977bb
to
6440512
Compare
🚨 New dead code detected in this PR: {
"FinancialConnectionsAPIClient.swift_sharePaymentDetails(consumerSessionClientSecret:paymentDetailsId:expectedPaymentMethodType:)": "FinancialConnectionsAPIClient.swift: warning: sharePaymentDetails(consumerSessionClientSecret:paymentDetailsId:expectedPaymentMethodType:) is unused",
"EmptyFinancialConnectionsAPIClient.swift_sharePaymentDetails(consumerSessionClientSecret:paymentDetailsId:expectedPaymentMethodType:)": "EmptyFinancialConnectionsAPIClient.swift: warning: sharePaymentDetails(consumerSessionClientSecret:paymentDetailsId:expectedPaymentMethodType:) is unused"
} Please remove the dead code before merging. If this is intentional, you can bypass this check by adding the label ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with |
Android equivalent: stripe/stripe-android#9308
Summary
This updates the Instant Debits flow to call the
/consumers/payment_details/share
endpoint instead of the/payment_methods
endpoint for Panther payments. This endpoint, along with theexpected_payment_method_type: "card"
parameter will indicate whether or not we should "Panther-ize" the payment method response. Lots more details in the Panther eng plan!Motivation
BANKCON-14531
Testing
With some minor changes to the mobile payment elements (PR coming next!) we can now see the full e2e flow in action!
Screen.Recording.2024-09-26.at.3.11.43.PM.mov
Changelog
N/a