-
Notifications
You must be signed in to change notification settings - Fork 999
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
ApplePayContext handles shipping #1561
Conversation
addressParams.postalCode = address.postalCode; | ||
|
||
NSPersonNameComponentsFormatter *formatter = [NSPersonNameComponentsFormatter new]; | ||
formatter.style = NSPersonNameComponentsFormatterStyleLong; |
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 produces a name like "Dr. Jonathan Maple Appleseed Esq." vs. ...StyleDefault
which produces a name like "Jonathan Appleseed".
e0d5748
to
3a6b986
Compare
@@ -90,7 +90,7 @@ - (void)pay { | |||
|
|||
#pragma mark - STPApplePayContextDelegate | |||
|
|||
- (void)applePayContext:(STPApplePayContext *)context didCreatePaymentMethod:(__unused STPPaymentMethod *)paymentMethod completion:(STPIntentClientSecretCompletionBlock)completion { | |||
- (void)applePayContext:(STPApplePayContext *)context didCreatePaymentMethod:(__unused STPPaymentMethod *)paymentMethod paymentInformation:(__unused PKPayment *)paymentInformation completion:(STPIntentClientSecretCompletionBlock)completion { |
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.
Would appreciate scrutiny on this API change!
@@ -61,6 +66,8 @@ didSelectShippingMethod:(PKShippingMethod *)shippingMethod | |||
/** | |||
Called when the user has selected a new shipping address. You should inspect the | |||
address and must invoke the completion block with an updated array of PKPaymentSummaryItem objects. | |||
|
|||
@note This does not contain full contact information - you can only receive that after the user authorizes payment, in the paymentInformation passed to `applePayContext:didCreatePaymentMethod:paymentInformation:completion:` |
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.
the distinction here isn't really clear to me. Could we enumerate what is available vs what isn't available here in a little more detail?
Financial Connections: started client-side-tinting Consent and Data Access View icons.
Summary
STPApplePayContext
automatically attaches shipping details to PaymentIntent upon confirmation, and also passes the rawPKPayment
back to the user if they want to collect shipping details themselves.Motivation
https://jira.corp.stripe.com/browse/IOS-1668
Testing
PKPayment
is passed.