-
Notifications
You must be signed in to change notification settings - Fork 264
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
breaking: add support for apple pay line items to payment sheet #1020
breaking: add support for apple pay line items to payment sheet #1020
Conversation
bd78b30
to
54a5929
Compare
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.
looks good!
3d77c79
to
c02a9ab
Compare
Any. way to support EURO currency ? @charliecruzan-stripe |
One question, what is the isPending parameter for? @charliecruzan-stripe |
That sets the PKPaymentSummaryItemType to pending if true, or final if false |
@charliecruzan-stripe No idea for my question about euro currency ? |
@ScreamZ are you looking to set the currency to euro in payment sheet, or directly in |
Summary
Adds in support for apple pay line items to payment sheet, and also expands the possible options for apple pay line items to include those introduced in iOS 15
This does include a couple small breaking changes (small meaning easily migrate-able):
ApplePay.CartSummaryItem
: renamedtype
toisPending
.type
is a very general field name and doesn't provide a good description of what it's doing. Migration guide included in CHANGELOG. We run the risk of Apple adding anotherPKPaymentSummaryItemType
, but I think that's unlikely (since they seem to be instead transitioning to wholly different item types such asPKDeferredPaymentSummaryItem
)ApplePay.CartSummaryItem
: added a new requiredpaymentType
field. In all existing code, merchants should set this topaymentType: 'Immediate'
(since we only had support for Immediate up until this PR).Motivation
closes #964
context: https://paper.dropbox.com/doc/2022-06-01-PaymentSheet-Apple-Pay-Line-Items-Mobile-API-Review--Bj2jImE0_eYxuR0dPw5B__jyAg-kqjRdFlgqiAxQvKUiBFH3
Testing
Added unit tests for all ApplePayUtils functionality
Documentation
Select one: