Skip to content
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-15711] Pass billing address and email address to payment details API #4148

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mats-stripe
Copy link
Collaborator

@mats-stripe mats-stripe commented Oct 16, 2024

Android equivalent: stripe/stripe-android#9446

Summary

This passes the billing address model and a billing email to the /consumers/payment_details/ API. More details: https://docs.google.com/document/d/1IP66DkxVK6DzeGCmuw00Gt9okFhEHQgM3lqBZSA-M4E/edit?usp=sharing

Note

There is currently a bug where the billing address is not being backfilled when using an existing Link account. This is being looked into (Slack), and can most likely be fixed with a backend change.
Screenshot 2024-10-17 at 9 17 59 AM

Motivation

BANKCON-15711

Testing

Unit tests, and I've verified the billing fields are correctly passed from MPE to the API call:

Screenshot 2024-10-16 at 3 12 25 PM

Changelog

N/a

}

if let billingEmail, !billingEmail.isEmpty {
parameters["billing_email_address"] = billingEmail
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +38 to +44
case name
case line1 = "line_1"
case line2 = "line_2"
case city = "locality"
case state = "administrative_area"
case postalCode = "postal_code"
case countryCode = "country_code"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

github-actions bot commented Oct 16, 2024

🚨 New dead code detected in this PR:

FinancialConnectionsAPIClient.swift:246 warning: Function 'paymentDetails(consumerSessionClientSecret:bankAccountId:billingAddress:billingEmail:)' is unused

Please remove the dead code before merging.

If this is intentional, you can bypass this check by adding the label skip dead code check to this PR.

ℹ️ If this comment appears to be left in error, double check that the flagged code is actually used and/or make sure your branch is up-to-date with master.

@mats-stripe mats-stripe marked this pull request as ready for review October 17, 2024 13:24
@mats-stripe mats-stripe requested review from a team as code owners October 17, 2024 13:24
@mats-stripe mats-stripe force-pushed the mats/pass_billing_address_to_payment_details branch 2 times, most recently from 905cca9 to dd16f78 Compare October 18, 2024 20:07
Copy link

⚠️ Public API changes detected:

StripePaymentSheet

- public var paymentMethodLayout: StripePaymentSheet.PaymentSheet.PaymentMethodLayout
- public enum PaymentMethodLayout {
- case horizontal
- case vertical
- case automatic
- public static func == (a: StripePaymentSheet.PaymentSheet.PaymentMethodLayout, b: StripePaymentSheet.PaymentSheet.PaymentMethodLayout) -> Swift.Bool
- public func hash(into hasher: inout Swift.Hasher)
- public var hashValue: Swift.Int {
- get
- }
- }

If you are adding a new public API consider the following:

  • Do these APIs need to be public or can they be protected with @_spi(STP)?
  • If these APIs need to be public, assess whether they require an API review.

If you are modifying or removing a public API:

  • Does this require a breaking version change?
  • Do these changes require API review?

If you confirm these APIs need to be added/updated and have undergone necessary review, add the label modifies public API to this PR to acknowledge and bypass this check.

ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant