Commit Graph

3874 Commits

Author SHA1 Message Date
Mel 336be4a0e3 Add analytics to IdentityVerificationSheet (#155)
This change adds analytics to the IDV sheet. Specifically, we're logging the following events:

- `stripeios.idprod.verification_sheet.presented` - the sheet is presented to the end-user
- `stripeios.idprod.verification_sheet.closed` - the sheet is closed by the end-user. Also contains a `session_result` to indicate whether the user successfully completed the IDV flow or closed the sheet to cancel out of the flow.
- `stripeios.idprod.verification_sheet.failed` - the sheet failed to open. Also contains an `error_dictionary` containing the error code, domain, and userInfo dictionary for the error that caused the sheet to fail to open.
2021-08-04 10:27:47 -07:00
Mel 16c2d2c28b IDPROD-1437: Identity example app (#148)
Created an "IdentityVerification Example" project to demonstrate how to use the `IdentityVerificationSheet`.
2021-08-04 10:27:47 -07:00
Mel 8e04f89725 IDPROD-1437: IdentityVerificationSheet using WKWebView (#143)
Added IdentityVerificationSheet to the Stripe SDK.

Note that Identity-specific classes have been marked as only available for iOS 14.3+. This is because WKWebView can only access the camera on iOS 14.3 and higher.
2021-08-04 10:27:47 -07:00
davidme-stripe b684f788d0
Merge pull request #308 from stripe-ios/davidme/paymentua
Send payment_user_agent with some API requests
2021-08-03 16:58:35 -07:00
Cameron 7c74bcbdfb
Sets accessibilityLabel on postalCodeField in STPPaymentCardTextField (#296)
* Sets accessibilityLabel on postalCodeField in STPPaymentCardTextField

* Community credit in CHANGELOG
2021-08-03 16:21:46 -07:00
David Estes a40f7ec966 Clean up code 2021-07-28 13:50:49 -07:00
David Estes 02e9778847 Add test 2021-07-28 13:44:21 -07:00
David Estes 99fedce2f5 Add test 2021-07-28 13:43:48 -07:00
David Estes 04e863c394 Fix Payment UA 2021-07-28 12:23:59 -07:00
jaimepark-stripe b26fe514a6
Change fastlane lane to stripeios_tests (#307) 2021-07-28 11:53:22 -07:00
David Estes ad551555d5 Payment User-Agent 2021-07-28 11:50:30 -07:00
davidme-stripe 4e5b64f017
Merge pull request #305 from stripe-ios/davidme/badssl
Switch to chromium badssl
2021-07-26 17:08:26 -07:00
David Estes e5e58ea330 Switch to chromium badssl 2021-07-26 16:14:26 -07:00
Yuki 9c089b3392
[mc] Billing address (#303)
* Billing address

* Add textContentType

* Parse localized field names

* Address spec

* Improve Dropdown to only didUpdate if changed, and call didUpdate when resigning first responder

* Refactor, undo test changes, thread safe loadAddressFormats

* Add strings

* Fix dropdown country ordering

* Remove fake ZZ country

* Fix tests

* Improve Dropdown country code

* Improve Dropdown country code
2021-07-23 09:50:34 -07:00
davidme-stripe 13af941a66
Merge pull request #301 from stripe-ios/public-prs/compile-time-reduction
Simplify expression in STPSectionHeaderView.swift
2021-07-20 13:27:53 -07:00
davidme-stripe 2c930a2e0e
Merge branch 'private' into public-prs/compile-time-reduction 2021-07-20 13:06:29 -07:00
David Estes b97033dc5c Update CHANGELOG 2021-07-20 12:56:58 -07:00
Jonathan Downing f68ae6cc11 Simplify expression in STPSectionHeaderView.swift 2021-07-20 15:39:18 -04:00
Yuki 6e31a05365
[core] Rework StripeSharedStrings (#298)
* Rework StripeSharedStrings

* rename
2021-07-16 17:28:15 -07:00
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