Commit Graph

3855 Commits

Author SHA1 Message Date
Cameron 3b20392e0d
Adds recommended usage to README (#266)
* Adds recommended usage to README

* Update README.md

Co-authored-by: davidme-stripe <52758633+davidme-stripe@users.noreply.github.com>

Co-authored-by: davidme-stripe <52758633+davidme-stripe@users.noreply.github.com>
2021-07-16 15:14:25 -07:00
Yuki 574139dc1a
[mc] Fix setup mode, add pay-with-setup mode, and more (#290)
* Add revolut iDEAL bank, remove moneyou

* Refactor Intent paymentMethodTypes

* Actually properly handle all save-related scenarios

* Turn on bancontact, sofort

* Fix test

* Add pay w/ setup mode to playground

* Improve PaymentSheetTest

* Dont show PM types that require returnURL on the Add screen if configuration.returnURL is not set, since they can never succeed.

* disable sofort, bancontact

* Renamed SaveMode cases
2021-07-16 11:24:21 -07:00
Mel bd8e58a5e0
MOBILESDK-326 & MOBILESDK-326: Add pod_tools.rb script (#292)
Created a new `pod_tools.rb` script which has the following commands:
- `push`: Pushes all podspecs to `trunk` in order by dependencies.
- `add-all-owners POD`: Adds all the owners of the `Stripe` pod as owners of `POD`.
- `add-owner OWNER-EMAIL`: Adds the registered user specified with `OWNER-EMAIL` as an owner of all pods in this repo. _(Used for onboarding)_
- `remove-owner OWNER-EMAIL`: Removes the user specified with `OWNER-EMAIL` from being owner of all pods in this repo. _(Used for offboarding)_
2021-07-15 16:20:17 -07:00
davidme-stripe a164aba98b
Merge pull request #282 from stripe-ios/davidme/fix-integration-tester-scrolling
Fix Integration Tester with WeChat Pay
2021-07-15 16:15:34 -07:00
Cameron ef927b5d15
Fixes StripeCore linking for sample projects (#287) 2021-07-15 16:14:21 -07:00
Cameron 63ab4857cc
Hides postal code on STPCardFormView init when appropriate (#293)
* Hides postal code on STPCardFormView init when appropriate. Improves NSLocale swizzling API.

* Don't bitwise and

* Very pedantic swizzling
2021-07-15 13:50:55 -07:00
Mel d33ae30ada
MOBILESDK-266 part2: Migrate unexpected error message (#281)
- Migrated `NSError.stp_unexpectedErrorMessage()` from `Stripe` -> `StripeCore`
- Went through Localization process
- Fixed test snapshots that contained updated localization for zh-Hans
2021-07-15 11:37:59 -07:00
Mel 161a2f7886
Update export_builds script to zip all frameworks together (#291)
- Add StripeCore to export_builds.sh
- Now zipping all xcframeworks (Stripe, Stripe3DS2, and StripeCore) into one `Stripe.xcframework.zip` file
2021-07-14 19:11:10 -07:00
Mel c2a2b98df7
Fix build settings for StripeCoreTestingUtils (#288)
- `StripeCoreTestingUtils` now uses `StripeiOS-Debug.xcconfig` and `StripeiOS-Release.xcconfig` for its build settings.
- Now including  `StripeCoreTestingUtils` in `StripeCoreTests` by Linking with Binary instead of Dependencies.
2021-07-14 15:17:29 -07:00
Mel babdfdae22
MOBILESDK-266: multi-module localization (#280)
Adds the ability to put localized strings in `StripeCore` and sets up infrastructure for any new module to contain localized strings. Now each module will have...
- Its own version of `STPLocalizedString`
- Its own set of `Resources/Localizations/*.lproj/Localizable.strings` files
2021-07-13 15:03:29 -07:00
Cameron 9ea67744fa
Fixes broken card scanning links (#260)
Co-authored-by: davidme-stripe <52758633+davidme-stripe@users.noreply.github.com>
2021-07-13 14:53:04 -07:00
Mel b926804cde
Remove SPI protocol abstraction (#283)
- Remove abstraction for SPI-public protocols and instead tell Jazzy to ignore them using `:nodoc:` notation.
- Added comment notes linking to https://github.com/realm/jazzy/issues/1262
2021-07-13 14:40:26 -07:00
davidme-stripe 6e94503c40
Merge pull request #285 from stripe-ios/dependabot/bundler/addressable-2.8.0
Bump addressable from 2.7.0 to 2.8.0
2021-07-13 13:42:29 -07:00
dependabot[bot] 29bb18e7f9
Bump addressable from 2.7.0 to 2.8.0
Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/sporkmonger/addressable/releases)
- [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.7.0...addressable-2.8.0)

---
updated-dependencies:
- dependency-name: addressable
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-13 18:19:42 +00:00
Yuki 848a1b60e9
Fix cursor always going to end of text field after edit (#284) 2021-07-12 16:52:39 -07:00
David Estes 76460f6e98 ScrollToAndTap 2021-07-12 09:12:24 -07:00
Yuki 0a554097a4
[mc] Bug fixes and polish (#277)
* Change colors when disabled.

* Split out DropdownTextField, add disabled color

* Add some haptics, scroll to selected pm type cell

* Refactor out ValidationState, only TextField needs it.

Make TextFieldView text red if invalid

* SectionView forwards touch events to the appropriate subview

* Improve placeholder -> label

* Auto-advance

* error

* Update mandate text

* Refactor out the FloatingPlaceholderTextFieldView and make TextFieldView and DropdownFieldView use it

* Accessibility

* Dont always show save checkbox, make formelement factory a bit nicer

* Update localization

* Fix test

* DRY up FormElement factory, fix guest mode

* Rename CheckboxElement -> SaveCheckboxElement, fix tests

* Fix params convenience init
2021-07-09 12:27:52 -07:00
Mel 5e550dd4ce
MOBILESDK-291: Migrate tests to StripeCore and add tests to CI (#276)
StripeCore tests:
- Migrated tests specific to classes in `StripeCore` to `StripeCoreTests`
- Created a `StripeCoreTestUtils` target to contain `MockAnalyticsClient` so the mock can be included in test targets for multiple SDKs
- Added StripeCore tests to `Fastfile` & `circleci/config.yml` so they'll run on our CI
- Updated the [Configure Tests](https://confluence.corp.stripe.com/display/~mludowise/%5BWIP%5D+iOS+SDK+Runbook%3A+Adding+a+new+module#id-[WIP]iOSSDKRunbook:Addinganewmodule-ConfigureTests) portion of our runbook for adding a new module to match the steps taken in this PR

Cleanup:
- Renamed `main_tests` and `standard-tests` to `stripeios-tests` in the Fastfile & circle yml so our test names match the module they're testing
- Added `DEFAULT_TEST_DEVICE` and `DEFAULT_TEST_VERSION` consts to our Fastfile to help ensure consistent testing platforms across our tests as we add more modules
2021-07-08 15:03:22 -07:00
Mel 8ce9d92af8
MOBILESDK-265: Move analytics to StripeCore (#274)
- Migrated `STPAnalyticsClient` & dependent classes into `StripeCore`
- Exposed internally available analytics code with to spi-public using the `STP` namespace so it could be used from other Stripe modules
- Migrated `STPAPIClient.sharedUrlSessionConfiguration` -> `StripeAPIConfiguration.sharedUrlSessionConfiguration` so it can be shared across modules
- Dependency injected the public key from `STPAPIClient` into `STPAnalyticsClient` via a new `PublishableKeyProvider` protocol
- Created wrappers for protocols declared SPI-public inside `StripeCore` to avoid displaying SPI-public conformance in our docs
- Updated `build_documentation.sh` to clean the pod cache for all Stripe pods
2021-07-08 13:25:07 -07:00
davidme-stripe 68c36e67ec
Merge pull request #275 from stripe-ios/jaimepark/release-21.7.0
Bump 21.6.0 -> 21.7.0
2021-07-07 16:37:10 -07:00
Jaime Park 74462e4296 rebuild documentation 2021-07-07 14:47:57 -07:00
Jaime Park 09ec95f26e add new commit to CHANGELOG 2021-07-07 13:59:19 -07:00
Jaime Park c2e330b22d run build_documentation.sh 2021-07-07 13:35:46 -07:00
Jaime Park 883de76bf3 run update_version.sh 2021-07-07 13:35:45 -07:00
Jaime Park 7a91014914 Bump 21.6.0 -> 21.7.0 2021-07-07 13:35:45 -07:00
Yuki d236285ed0
Fix additionalDocument -> additional_document (#278) 2021-07-07 10:56:34 -07:00
Yuki 14596a3967
[MC] SEPA support (#265)
* SEPA saved PMs

* SEPA Debit

* Remove old-way code

* Handle SEPA errors

* Wait longer for test?

* PR feedback

* Attempt to simplify IBAN validation logic

* Update localization

* PR feedback
2021-07-02 14:37:21 -07:00
davidme-stripe 88e06d8e85
WeChat Pay PM (#208)
Adds WeChat Pay to PaymentMethods.
2021-07-01 14:34:29 -07:00
Cameron 66a40da0d4
Fixes docstring typo (#261) 2021-07-01 13:46:44 -07:00
Mel 45ee1ac390
MOBILESDK-318: Add StripeCore dependency to Stripe (#273)
- Add a dependency on `StripeCore` for the StripeiOS target, Carthage, SPM, and Cocoapods
- Update `StripeCore.podspec` to use a tag instead of a branch
- Shared `StripeCore.xcscheme` so Carthage builds StripeCore
- Modified `build_documentation.sh` to pass a temporary local podspec repo so it can find `StripeCore`
2021-07-01 13:46:14 -07:00
jaimepark-stripe 5065438a28
Update payment sheet with ordered payment method types (#271)
* Update payment sheet with ordered payment method types

* change backend to remixed project + new customer

* remove glitch app

* fix func name
2021-06-30 13:39:55 -07:00
davidme-stripe d3775750b9
Weak link SwiftUI (#272) 2021-06-30 12:14:12 -07:00
Yuki 548ae17b71
Fix STPPaymentCardTextField.brandImage not supporting subclassing (#270) 2021-06-30 11:14:25 -07:00
Mel d6cf9fad79
MOBILESDK-260 part2: Create empty StripeCore project (#264)
- Created a new `StripeCore` project (with `Placeholder.swift` file)
- Added `StripeCore.podspec` and new `StripeCore` target in `Packages.swift`
- Updated `check_version.rb` and `update_version.sh` to check & update versions in all `*.podspec` files
- Added `check_podspecs_for_branches.sh` to use during deploy process
2021-06-29 20:07:08 -07:00
Mel ffd1a023e7
MOBILESDK-260 part1: Cleanup build configurations so they can be shared (#263)
- Moved `BuildConfigurations` out of `Stripe` folder and into root directory
- Deleted unused xcconfig files (`LocalizationTester*.xcconfig` and `StripeiOSResources.xcconfig`)
- Migrated `StripeiOS`-specific build settings out of shared xcconfig files and onto the project.
- Added `clean_project_build_settings.sh` to ensure `project.pbxproj` files don't overwrite xcconfig settings (more below)
- Removed build settings from the StripeiOS target that were overriding xcconfigs (using `clean_project_build_settings.sh`)
2021-06-29 18:09:02 -07:00
jaimepark-stripe e829f26cef
Add internal ordered payment method types to PI and SI (#267)
* Add internal ordered payment method types to PI and SI

* update comment and remove test

* removed default param

* default order to intent pm

* updated ordered payment method in si + test
2021-06-29 17:20:10 -07:00
jaimepark-stripe 10dc8e7808
Resetting locale on AfterpayBreakdownView snapshot test (#269)
* reset locale

* remove tests
2021-06-29 17:18:47 -07:00
Cameron 5e3e452494
Adds 3DS2 support for Cartes Bancaires (#257)
* Adds 3DS2 support for Cartes Bancaires

* Fixes unused directory server value in STDSProgressViewController (does not effect production since we bypass this class in actual challenge flows)
2021-06-28 15:50:35 -07:00
Yuki 056d1400da
[mc] iDEAL using FormElement (#254)
* Add iDEAL using FormElement

* Delete old iDEAL implementation

* Dropdown and text field accessibility

* Fix email configuration

* Fix checkbox darkmode

* Remove other PM support declaration from mc until we're ready to ship them

* Add Select bank label
2021-06-28 10:49:31 -07:00
Mel 3a4cb58b28
MOBILESDK-267: Configure all version strings from VERSION file (#224)
This change updates our release process to update fewer version and enables us to more easily share the version string across multiple frameworks when we split the SDK. We will no longer need to manually edit the version strings for:
- `Info.plist`
- `Stripe.podspec`
- `STPAPIClient.swift`

This change:
1. Adds a `Version.xcconfig` file that controls `StripeiOS` project & build version. This will eventually be shared across multiple frameworks.
2. Adds an `update_version.sh` script that will update the version strings in `Version.xcconfig`, `Stripe.podspec`, and `StripeAPIConfiguration+Version.swift` from the `VERSION` file.
3. Migrates hardcoded version string from `STPAPIClient.STPSDKVersion` into `StripeAPIConfiguration+Version.swift`. This file:
    - Is autogenerated from `VERSION`
    - Will be moved to `StripeCore` as part of MOBILESDK-265
2021-06-24 16:26:18 -07:00
Yuki baeed0a067
[mc] DropdownField, Sofort form (#253)
* Adds DropdownField
Adds support for sofort

- If field.isHidden, don't update params

* Fix not using locale arg in DropdownFieldElement
2021-06-24 11:35:00 -07:00
jaimepark-stripe 2876f50d17
Created PaymentIntentWithPreferences along with api requests (#256)
* PaymentIntent with ordered payment method + api request

* add unit test

* addressed comments

* rm line
2021-06-23 14:57:27 -07:00
davidme-stripe add96dced5
Make STPPaymentCardTextField completely open (#252)
* Make STPPaymentCardTextField completely open

* Make STPPaymentCardTextField completely open
2021-06-22 14:44:20 -07:00
davidme-stripe 0844df123c
Fix support for Xcode 13 (#247)
* Xcode 13 support

* Remove unused code
2021-06-22 08:55:56 -07:00
Yuki b9f1b7fa86
[mc] Form, Section, TextFieldElement, Bancontact (#245)
* FormElement, TextFieldElement, SectionView

* Form

* Refactor PaymentOption.paymentMethodParams -> IntentConfirmParams

* Refactor AddPMVC, *PMEditViews to use Element instead of AddPaymentMethodViewProtocol

* ValidationState logic:
1. Make the pay button enabled state reflect ValidationState.
2. Make Sections display errors according to ValidationState.

* Cleanup, text field placeholder, bancontact, tests

* Added views: Checkbox, SepaMandate.
Reworked TextFieldView to handle optionality.

* Fixups

* fix documentation?

* Replace filter from text configuration

* Delete unused method

* Dont allow bancontact yet
2021-06-21 16:28:30 -07:00
davidme-stripe ae75896a6b
Add PaymentSheet Example app to TestFlight (#250)
* Add PaymentSheet Example app

* Add PaymentSheet Example app
2021-06-18 07:45:48 -07:00
davidme-stripe 7041126b94
Fix PanModal conflicts (#244)
* Fix PanModal conflicts

* Save before pushing to git
2021-06-17 12:09:18 -07:00
davidme-stripe 515f31afdd
Update to Big Sur + Xcode 12.5 on CircleCI (#225)
* Update to latest CircleCI builder

* More improvements

* Fix warning in Xcode 12.5
2021-06-17 10:27:55 -07:00
jaimepark-stripe 1c5c128990
Add Clearpay logo to AfterpayPriceBreakdownView when locale is UK (#248)
* Add clearpay logo for gb

* add project.pbxproj for new files

* change logo size and test ref images

* add snapshot test to skip-snapshot-test list

* added comma
2021-06-16 17:48:17 -07:00
jaimepark-stripe 5f9bedde8e
Handling camera orientation rotation for card scanner (#246)
* add files

* change available property
2021-06-16 10:12:26 -07:00