Skip to content

Commit

Permalink
feat: Enable ACH via Stripe Vaulting flows (#1056)
Browse files Browse the repository at this point in the history
* Update CardButton to match Styles

* Update styles in list view

* Remove mandate steps from vaulting flow

* add package.resolved to gitignore

* Use codable correctly for client session mgmt

* Fix conflicts

* Fix conflicts

* More cleanup for new workflow flag removal

* More cleanup for new workflow flag removal

* Fix conflicts

* Fix error in api key header update logic

* Fix conflicts

* Revert "Fix conflicts"

This reverts commit 018798b.

* Fix conflicts

* Add controls back in for dismissal

* Dont sent cvv for non card payment methods

* Reformat

* Cleanup networking

* Enable paying with Vaulted ACH Token on Drop-in

* Extend metadata with deviceInfo

* Fix mocks

* Fix dark mode issues

* Remove duplicated code

* Update tests

* Fix missing file

* Add secrets to CI Build

* Secrets in correct directory

* Add accessibility ID and ensure payment data is passed to results controller

* UI Test fixes

* Add ACH Manager Category and Spinner on ACH Continue

* More cleanup for new workflow flag removal

* Fix conflicts

* Revert "Fix conflicts"

This reverts commit 018798b.

* Fix conflicts

* Add closing tag

* Fix main.storyboard

* Add apple pay stack view lost in merge

* Fix copy

* Refactor complete endpoint to inject body

* Fix result screeen

* Fix failing test

---------

Co-authored-by: Jack Newcombe <[email protected]>
  • Loading branch information
NQuinn27 and jnewc authored Dec 17, 2024
1 parent 443e6c7 commit e0cb7e9
Show file tree
Hide file tree
Showing 52 changed files with 852 additions and 1,072 deletions.
7 changes: 7 additions & 0 deletions .github/actions/appetize-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ inputs:
pr-number:
description: PR number
required: true
stripe-publishable-key:
description: 'Stripe publishable key'
required: true
outputs:
appetize-url:
description: Appetize URL
Expand Down Expand Up @@ -80,6 +83,10 @@ runs:
- name: Install SMB
shell: bash
run: npm install --save slack-message-builder
- name: Create secrets.defaults.properties
shell: bash
run: |
echo "STRIPE_PUBLISHABLE_KEY=${{ inputs.stripe-publishable-key }}" > Debug\ App/secrets.defaults.properties
- name: Test, Build, and Distribute app to Appetize 🚀
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-test-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ jobs:
slack-channel: ${{ secrets.SLACK_MOBILE_SDK_CHANNEL }}
slack-reporter-token: ${{ secrets.SLACK_REPORTER_BOT_TOKEN }}
github-run-id: ${{ github.run_id }}
stripe-publishable-key: ${{ secrets.STRIPE_PUBLISHABLE_KEY }}
- uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e #v3.1.0
if: ${{ success() }}
id: find_comment
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
slack-channel: ${{ secrets.SLACK_MOBILE_SDK_CHANNEL }}
slack-reporter-token: ${{ secrets.SLACK_REPORTER_BOT_TOKEN }}
github-run-id: ${{ github.run_id }}
stripe-publishable-key: ${{ secrets.STRIPE_PUBLISHABLE_KEY }}
build-and-upload-to-firebase-and-browserstack:
runs-on: macos-13
timeout-minutes: 20
Expand Down Expand Up @@ -96,6 +97,11 @@ jobs:
env:
FIREBASE_CREDENTIALS: ${{ secrets.FIREBASE_CREDENTIALS }}

- name: Create secrets.defaults.properties
shell: bash
run: |
echo "STRIPE_PUBLISHABLE_KEY=${{ secrets.STRIPE_PUBLISHABLE_KEY }}" > Debug\ App/secrets.defaults.properties
- name: Distribute internally on Firebase and upload to Browserstack 🚀
run: |
bundle exec fastlane qa_release
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ playground.xcworkspace

.build/
Package.swift.orig

Package.resolved
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
Expand Down
Empty file added .vscode/launch.json
Empty file.
2 changes: 0 additions & 2 deletions Debug App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
Expand Down
6 changes: 4 additions & 2 deletions Debug App/Primer.io Debug App SPM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
E11F475D2B06C5A40091C31F /* BanksListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E11F47592B06C5A40091C31F /* BanksListView.swift */; };
E11F475E2B06C5A40091C31F /* BanksListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E11F475A2B06C5A40091C31F /* BanksListModel.swift */; };
E11F475F2B06C5A40091C31F /* ImageViewWithUrl.swift in Sources */ = {isa = PBXBuildFile; fileRef = E11F475B2B06C5A40091C31F /* ImageViewWithUrl.swift */; };
E1AB44D02AFE139600639DC5 /* URL+NetworkHeaders.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1AB44CF2AFE139600639DC5 /* URL+NetworkHeaders.swift */; };
F00C65F82ACC67FA00187028 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC5687FF32E8661F1A00CE5 /* AppDelegate.swift */; };
F00C65F92ACC67FA00187028 /* Data+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1594BC5C96ECC3F46C811B2F /* Data+Extensions.swift */; };
F00C65FA2ACC67FA00187028 /* Range+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9128566126AA7F571FFECA3A /* Range+Extensions.swift */; };
Expand Down Expand Up @@ -62,6 +61,7 @@
F08F63E02BA0BE83006EF9A9 /* SessionConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = F08F63DF2BA0BE83006EF9A9 /* SessionConfiguration.swift */; };
F08F63E32BA0BEAD006EF9A9 /* AppetizeConfigProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F08F63E12BA0BEAD006EF9A9 /* AppetizeConfigProvider.swift */; };
F08F63E42BA0BEAD006EF9A9 /* MetadataParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = F08F63E22BA0BEAD006EF9A9 /* MetadataParser.swift */; };
F09978842D0326860058E4B5 /* Metadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = F09978832D0326860058E4B5 /* Metadata.swift */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -158,6 +158,7 @@
F08F63DF2BA0BE83006EF9A9 /* SessionConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionConfiguration.swift; sourceTree = "<group>"; };
F08F63E12BA0BEAD006EF9A9 /* AppetizeConfigProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppetizeConfigProvider.swift; sourceTree = "<group>"; };
F08F63E22BA0BEAD006EF9A9 /* MetadataParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetadataParser.swift; sourceTree = "<group>"; };
F09978832D0326860058E4B5 /* Metadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Metadata.swift; path = Sources/Model/Metadata.swift; sourceTree = "<group>"; };
F816A2444633C4336A7CB071 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = "<group>"; };
F9023841AFCE8E3205CB713A /* String+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = "<group>"; };
FB1F71737862EF5D0F4FE5AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -243,6 +244,7 @@
1C9799A622D0CCDBBF94925B = {
isa = PBXGroup;
children = (
F09978832D0326860058E4B5 /* Metadata.swift */,
F04510DE2ACD4EA500A0A48C /* primer-sdk-ios */,
FBDF3F8B5F93A0EC28048640 /* Project */,
DF30711EB149C64C364BB79A /* Products */,
Expand Down Expand Up @@ -493,6 +495,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F09978842D0326860058E4B5 /* Metadata.swift in Sources */,
8723ADE42B8E0FAB00A5FE23 /* MerchantHeadlessKlarnaInitializationView.swift in Sources */,
F08F63E42BA0BEAD006EF9A9 /* MetadataParser.swift in Sources */,
044F805D2C6B4F9800E9F878 /* MerchantHeadlessStripeAchFieldsViewModel.swift in Sources */,
Expand All @@ -515,7 +518,6 @@
8723ADDD2B8E0F5100A5FE23 /* MerchantHelpers.swift in Sources */,
F00C66022ACC67FA00187028 /* TestScenario.swift in Sources */,
F00C66032ACC67FA00187028 /* TransactionResponse.swift in Sources */,
E1AB44D02AFE139600639DC5 /* URL+NetworkHeaders.swift in Sources */,
E11F475D2B06C5A40091C31F /* BanksListView.swift in Sources */,
F00C66052ACC67FA00187028 /* Networking.swift in Sources */,
F00C66062ACC67FA00187028 /* MerchantDropInUIViewController.swift in Sources */,
Expand Down
8 changes: 4 additions & 4 deletions Debug App/Primer.io Debug App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
DE53DA2D0AD108306C92E198 /* UIViewController+API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FD8065D40A2D691F643F3B /* UIViewController+API.swift */; };
E11F47542B06C5030091C31F /* BanksListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E11F47502B06C5030091C31F /* BanksListView.swift */; };
E11F47562B06C5030091C31F /* ImageViewWithUrl.swift in Sources */ = {isa = PBXBuildFile; fileRef = E11F47522B06C5030091C31F /* ImageViewWithUrl.swift */; };
E1A2971F2B021ABA005ADA51 /* URL+NetworkHeaders.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1AB44D12AFE13AF00639DC5 /* URL+NetworkHeaders.swift */; };
EA7FAA4F8476BD3711D628CB /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B18D7E7738BF86467B0F1465 /* Images.xcassets */; };
F02F496FD20B5291C044F62C /* MerchantResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E3C8FE62D22147335F2455 /* MerchantResultViewController.swift */; };
F03699592AC2E63700E4179D /* BuildFile in Sources */ = {isa = PBXBuildFile; };
F08F63D82B9B5A7C006EF9A9 /* SessionConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = F08F63D72B9B5A7C006EF9A9 /* SessionConfiguration.swift */; };
F08F63DA2B9B5BC5006EF9A9 /* AppetizeConfigProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F08F63D92B9B5BC5006EF9A9 /* AppetizeConfigProvider.swift */; };
F08F63DC2B9F27B0006EF9A9 /* MetadataParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = F08F63DB2B9F27B0006EF9A9 /* MetadataParser.swift */; };
F09978822D00B7620058E4B5 /* Metadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = F09978812D00B7620058E4B5 /* Metadata.swift */; };
F0C2147F6FA26527BE55549A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = FC701AFD94F96F0F1D108D1A /* LaunchScreen.xib */; };
FD5ADBCFA70DB606339F3AF2 /* TransactionResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70D3D6CF0F006A06B7CEC71B /* TransactionResponse.swift */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -200,14 +200,14 @@
E11F47512B06C5030091C31F /* BanksListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BanksListModel.swift; sourceTree = "<group>"; };
E11F47522B06C5030091C31F /* ImageViewWithUrl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageViewWithUrl.swift; sourceTree = "<group>"; };
E129D66F2B162022004694F9 /* MerchantHeadlessCheckoutBankViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MerchantHeadlessCheckoutBankViewController.swift; sourceTree = "<group>"; };
E1AB44D12AFE13AF00639DC5 /* URL+NetworkHeaders.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "URL+NetworkHeaders.swift"; sourceTree = "<group>"; };
E1C3EF0BA039C0A50EDE13A5 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Main.strings; sourceTree = "<group>"; };
E3F4FB59DFC387F26CA944EB /* Pods_Debug_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Debug_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E7640DB186F9638C2F556F77 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Main.strings; sourceTree = "<group>"; };
E8DE1E4FB055B60582977315 /* Networking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Networking.swift; sourceTree = "<group>"; };
F08F63D72B9B5A7C006EF9A9 /* SessionConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionConfiguration.swift; sourceTree = "<group>"; };
F08F63D92B9B5BC5006EF9A9 /* AppetizeConfigProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppetizeConfigProvider.swift; sourceTree = "<group>"; };
F08F63DB2B9F27B0006EF9A9 /* MetadataParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MetadataParser.swift; sourceTree = "<group>"; };
F09978812D00B7620058E4B5 /* Metadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Metadata.swift; sourceTree = "<group>"; };
F816A2444633C4336A7CB071 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = "<group>"; };
F9023841AFCE8E3205CB713A /* String+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = "<group>"; };
FB1F71737862EF5D0F4FE5AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -374,7 +374,6 @@
isa = PBXGroup;
children = (
E8DE1E4FB055B60582977315 /* Networking.swift */,
E1AB44D12AFE13AF00639DC5 /* URL+NetworkHeaders.swift */,
);
path = Network;
sourceTree = "<group>";
Expand Down Expand Up @@ -418,6 +417,7 @@
A6AEF11B151368BF993C3EA9 /* TestScenario.swift */,
70D3D6CF0F006A06B7CEC71B /* TransactionResponse.swift */,
F08F63D72B9B5A7C006EF9A9 /* SessionConfiguration.swift */,
F09978812D00B7620058E4B5 /* Metadata.swift */,
);
path = Model;
sourceTree = "<group>";
Expand Down Expand Up @@ -693,11 +693,11 @@
AAE3B30B64B6822A20987FCA /* CreateClientToken.swift in Sources */,
F08F63D82B9B5A7C006EF9A9 /* SessionConfiguration.swift in Sources */,
87FC1ACB2BE5194100C9F474 /* MerchantHeadlessStripeAchFieldsViewModel.swift in Sources */,
F09978822D00B7620058E4B5 /* Metadata.swift in Sources */,
04F323652BD40A0E00F5927C /* MerchantHeadlessCheckoutBankViewController.swift in Sources */,
876141082B8346650058CA8C /* MerchantHeadlessKlarnaInitializationView.swift in Sources */,
C75A11E6AEEFC2B7A29BBC04 /* TestScenario.swift in Sources */,
F08F63DC2B9F27B0006EF9A9 /* MetadataParser.swift in Sources */,
E1A2971F2B021ABA005ADA51 /* URL+NetworkHeaders.swift in Sources */,
FD5ADBCFA70DB606339F3AF2 /* TransactionResponse.swift in Sources */,
876140D52B63F7DB0058CA8C /* MerchantHeadlessCheckoutKlarnaViewController.swift in Sources */,
049A055E2B4BF057002CEEBA /* MerchantHeadlessVaultManagerViewController.swift in Sources */,
Expand Down
Loading

0 comments on commit e0cb7e9

Please sign in to comment.