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

[Beta Build] Merging Feature/Payment-Sheet into Main #1709

Merged
merged 6 commits into from
Aug 8, 2022

Conversation

msadoon
Copy link
Contributor

@msadoon msadoon commented Aug 8, 2022

To get a beta build out for features that are not complete but testable and to allow tickets to be moved into "Done" before final code reaches production, we're going to merge feature branches against main regularly.

All this code is in a releasable state.

Meaning: if we cut a production build after merging this branch, no untested/incomplete code is available to users because it has been gated by Optimizely feature flags.

* Removed carthage dependency of stripe sdk. Moved to SPM. Going from version 18 to 22. Not building, and no code changes. Will commit individual working frameworks once they are compiling.

* wrapped changes to add new card view.

* all frameworks building. Documented changes in PR. Haven't run tests yet, they might fail on Kickstarter-iOS framework.

* updated tests for STPPaymentHandler

* wrapped STPPaymentCardTextField in our own class so Settings.storyboard isn't dependant on Stripe directly.

* wrapped STPPaymentCardTextField in our own class so Settings.storyboard isn't dependant on Stripe directly.

* added class that wraps the STPPaymentCardTextField, cleaned up depedencies on Kickstarter-Framework and tests.

* updated publishable key in add new card view controller

* updated publishable key in add new card view controller

* removed duplicate zip code from add new card view.
* added setup intent and mutation with tests. Still missing service layer request, envelope and tests for those.

* service call, adapter, stubs, tests.

* updated graph schema and create setup intent input.
…eet (#1707)

* added logic to pass the new payment sheet data to the data source and cell. Everything is in place to work for one payment sheet card. The only thing missing is the hook into the reloadPaymentMethods signal after the payment option is updated with card data. Also needs testing.

* adding a new payment sheet card displays in within the payment methods view. Need to correct for multiple cards added and selecting cards.

* allowed adding multiple cards via payment sheet. Still need to allow card selection and write tests.

* added tests for data source and pledge payment methods view model. No view controller tests, cell tests or view model tests. Need to add those separately, because require the Stripe library to work within the testing framework, which it should if using @testable.
@msadoon msadoon requested review from Arkariang and a team August 8, 2022 19:37
@msadoon msadoon self-assigned this Aug 8, 2022
@msadoon msadoon modified the milestone: release-5.5.0 Aug 8, 2022
* optimizely ff added and tested. Needs to be added to existing pledge payment methods page.

* added and tested in-app gating within pledge page. Still need unit tests and the ability to not see the ff in production environment for now (because there is untested scenario where user can select a payment method after adding a new payment sheet card. Not sure if this should be allowed in production atm.)

* revised logic around checking the ff helper function and updating the go to add new card signals. Unit tested logic changes.)
@msadoon msadoon marked this pull request as ready for review August 8, 2022 19:51
@nativeksr
Copy link
Collaborator

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@codecov
Copy link

codecov bot commented Aug 8, 2022

Codecov Report

Merging #1709 (5fd5e47) into main (a0a921c) will decrease coverage by 0.31%.
The diff coverage is 62.94%.

@@            Coverage Diff             @@
##             main    #1709      +/-   ##
==========================================
- Coverage   85.55%   85.23%   -0.32%     
==========================================
  Files        1258     1269      +11     
  Lines      112741   113329     +588     
  Branches    29904    30068     +164     
==========================================
+ Hits        96452    96598     +146     
- Misses      15242    15684     +442     
  Partials     1047     1047              
Impacted Files Coverage Δ
...rter-iOS/Library/STPCardBrand+CreditCardType.swift 0.00% <0.00%> (ø)
...mentHandler+StripePaymentHandlerActionStatus.swift 85.71% <ø> (ø)
...ws/Cells/PledgePaymentSheetPaymentMethodCell.swift 0.00% <0.00%> (ø)
...S/Views/Controllers/AddNewCardViewController.swift 0.00% <0.00%> (-73.67%) ⬇️
KsApi/Service.swift 9.86% <0.00%> (-0.14%) ⬇️
KsApi/ServiceType.swift 76.06% <ø> (ø)
Library/OptimizelyFeature.swift 0.00% <0.00%> (ø)
...PledgePaymentSheetPaymentMethodCellViewModel.swift 0.00% <0.00%> (ø)
KsApi/MockService.swift 13.19% <14.28%> (+<0.01%) ⬆️
...r-iOS/Views/Controllers/PledgeViewController.swift 73.66% <16.66%> (-0.32%) ⬇️
... and 28 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@msadoon msadoon merged commit 4b95bda into main Aug 8, 2022
@msadoon msadoon deleted the feature/payment-sheet branch August 8, 2022 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants