-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[MBL-864] Stripe Upgrade #1834
[MBL-864] Stripe Upgrade #1834
Conversation
need to do device testing. try add tests back in of pre-existing payment sheet.
Codecov Report
@@ Coverage Diff @@
## main #1834 +/- ##
==========================================
+ Coverage 84.47% 88.37% +3.90%
==========================================
Files 1278 887 -391
Lines 115258 79619 -35639
Branches 30688 21051 -9637
==========================================
- Hits 97359 70363 -26996
+ Misses 16831 8500 -8331
+ Partials 1068 756 -312
... and 394 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
All AC passed
- No changes to Apple Pay look to have changed
- No changes to Payment Sheet (iPad and iPhone) UI have changed
- Airtable scripts/tests pass
Just left a comment about the module imports you've updated. I think just a couple small changes could be made, but nothing major.
OOO the rest of the week after today, so use your best judgment to merge this if you make those changes and I'm already gone.
@@ -5,6 +5,7 @@ import Prelude | |||
import ReactiveExtensions | |||
import ReactiveExtensions_TestHelpers | |||
@testable import Stripe |
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.
can remove this import now that we're using StripePaymentSheet module.
I think we can update in PaymentMethodsViewModelTests
as well.
we could also update the import in STPPaymentHandlerActionStatus
extension. importing Stripe does technically give us access to StripePaymentHandlerActionStatus, but StripePaymentSheet is more directly what we want I think.
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.
Good point - tested removing import Stripe
in favor of import StripePaymentSheet
and tests still pass.
In STPPaymentHandler+StripePaymentHandlerActionStatus
and PledgePaymentMethodsViewModelTests
Corrections made, will update in next commit, just want to run the app again, surface the payment sheet as a sanity check. corrections
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.
@scottkicks I wanted to call out this mistake in your last pr that caused a build crash. I only noticed it when trying to build this branch to run on device.
It's easy to miss in the review because its' a change to the .project.pbxproj
file, which is a massive directory so hard to track file membership (ie which file belongs to which framework).
Turns out GraphAPI.TriggerThirdPartyEventInput+TriggerThirdPartyEventInputTests.swift
and TriggerThirdPartyEventInputTests.swift
were added to KsApi
when they should be added to KsApiTests
Fixed here.
I had to go back to my fix graph schema pr, run it on device, see that it was working then work backwards to find the pr above caused the on-launch crash.
Just be careful with adding the files to the right frameworks because it effects the run-time scenario in the app, even if the code compiles. Not sure why tests still passed in CI.
📲 What
Part of maintenance to upgrade all libraries to latest versions. 2023 Technical Plan lists Stripe because their have been many updates on Stripes side.
Entire release logs go from 22.8.4 -> 23.10.0
https://github.com/stripe/stripe-ios/releases/tag/22.8.4
🤔 Why
Upkeep with iOS system improvements and features from Stripe.
🛠 How
Started with 22.8.4.
23.0.0 was a breaking change because Stripe split their single framework into (Stripe, StripePaymentSheet, StripePaymentUI, StripeApplePay and a few others). Details.
import Stripe
toimport StripePaymentSheet
or leave it as is for non-payment sheet references.PaymentSheet.FlowController.PaymentOptionDisplayData
toPaymentSheetPaymentOptionsDisplayData
. The former is aStripe
data structure that crashes in tests because finding a card brand causes a module reference to fail being found.PaymentSheet.FlowController.PaymentOptionDisplayData
is just anUIImage
andString
so we can make our own version and use it in-app easily.Updated Stripe in SPM to Up to Next Major (23.10.0 < 24.0.0).
Also did a bit of clean up removing the
AddNewCardViewController
fromSettings
storyboard, a card brand type extension and an unusedPaymentCardTextField
✅ Acceptance criteria