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

STPShippingAddressViewController does not use billing address if instrument is not an STPCard #1209

Closed
karlr-stripe opened this issue Jun 28, 2019 · 2 comments
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@karlr-stripe
Copy link

karlr-stripe commented Jun 28, 2019

Summary

The Shipping view controller has a button "Use billing" that will copy the billing address of a card, to avoid the user needing to enter that information twice when e.g. going through the flow of using the STPPaymentContext to complete a payment. For example, with

STPPaymentConfiguration.shared().requiredShippingAddressFields = [.postalAddress]
STPPaymentConfiguration.shared().requiredBillingAddressFields = STPBillingAddressFields.full

However, it looks like this only works if using Card objects, and not Source(or PaymentMethods):

STPAddress *billingAddress = nil;
id<STPPaymentOption> paymentOption = paymentContext.selectedPaymentOption;
if ([paymentOption isKindOfClass:[STPCard class]]) {
STPCard *card = (STPCard *)paymentOption;
billingAddress = [card address];
}

If you're not using Cards, then the option won't appear, which makes it less convenient for customers to check out.

Code to reproduce

STPPaymentConfiguration.shared().requiredShippingAddressFields = [.postalAddress]
STPPaymentConfiguration.shared().requiredBillingAddressFields = STPBillingAddressFields.full
STPPaymentConfiguration.shared().createCardSources = true

and integrate the STPPaymentContext.

iOS version

11.4

Installation method

Carthage

SDK version

15.0.1

Other information

@yuki-stripe
Copy link
Collaborator

@karlr-stripe Thanks for filing - tracking internally here https://jira.corp.stripe.com/browse/IOS-1278

@yuki-stripe yuki-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Jun 28, 2019
@yuki-stripe
Copy link
Collaborator

Fixed in #1278

yuki-stripe pushed a commit that referenced this issue Jun 21, 2022
Saves the selfie uploaded file IDs and metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

2 participants