Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

<PaymentCardTextField /> locks up iOS apps on tipsi-stripe v6 #408

Closed
projectpublius opened this issue Nov 20, 2018 · 37 comments · Fixed by artsy/eigen#2838
Closed

<PaymentCardTextField /> locks up iOS apps on tipsi-stripe v6 #408

projectpublius opened this issue Nov 20, 2018 · 37 comments · Fixed by artsy/eigen#2838
Labels

Comments

@projectpublius
Copy link

Before I have submitted the issue

[X] I have read an installation guide
[X] I know that for an iOS I need to install pods because I've read the installation guide
[X] I have read a linking guide and checked that everything is OK like in manual linking guide
[X] I know that before using tipsi-stripe I need to set options for my app as described in usage guide

The problem

<PaymentCardTextField /> locks up iOS applications after upgrading tipsi-stripe from 5.6.0 to 6.1.2 and upgrading the iOS Stripe SDK from 11.2.0 to 13.2.0. The issue does not impact Android.

Environment

  • tipsi-stripe version: 6.1.2
  • Last tipsi-stripe version where the issue was not reproduced (if applicable): 5.6.0
  • iOS or Android: iOS
  • OS version: 12.1
  • React-Native version: 0.57.5
  • (Android only) com.google.firebase:firebase-core version:
  • (Android only) com.google.android.gms:play-services-base version:

Screenshots, GIFs (Must to have)

image

Code To Reproduce Issue (Good To Have)

Issue can be replicated by creating a new react native project and attempting to run the example code (https://tipsi.github.io/tipsi-stripe/docs/paymentcardtextfield.html) on a device or in simulator

@cybergrind
Copy link
Member

@projectpublius hi, thank you for your issue. Haven't checked it now, but internally we've upgraded our apps and everything looks fine for never stripe sdk + tipsi-stripe.
So maybe this is an issue with react-native 0.57.5 We're still on 0.52.3

@cybergrind
Copy link
Member

I cannot give you an estimation when we will look into this issue deeper right now. We're short on dev resources right now.

@projectpublius
Copy link
Author

Thanks. Reverting to version 5.6.0 works as a temporary solution.

@nenti
Copy link

nenti commented Nov 22, 2018

Same on RN0.56.1.

@theohdv
Copy link
Contributor

theohdv commented Nov 30, 2018

Same for me on RN 0.56.1. But it does not work only on iPhone X, XR, XS and XS max.

@projectpublius
Copy link
Author

Failed for me on a physical iPhone 6s Plus.

Interestingly, the field does work in the simulator.

@VicFrolov
Copy link

Yep, having the same issues as above. On Simulator, the field works, but tapping away from it causes the app to crash. On devices, simply tapping on the textInput causes a crash.

@thanhcuong1990
Copy link

thanhcuong1990 commented Dec 5, 2018

I've same issue with react-native 0.57.7 and tipsi-stripe 6.1.2.

@theohdv
Copy link
Contributor

theohdv commented Dec 14, 2018

I do not really understand why but it seems to be related to those lines

- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:self.window];
}

&

[[NSNotificationCenter defaultCenter]
  addObserver:self
  selector:@selector(keyboardWillShow:)
  name:UIKeyboardWillShowNotification
  object:self.window];

Because removing those lines seems to fix the issue.
Can someone explain me what is it for ?

I've created a PR (#418) to try to fix this.

@alexsegura
Copy link

Same problem when running on a real device (iPhone 5s)

I see this in XCode:

Can't find keyplane that supports type 11 for keyboard iPhone-Portrait-NumberPad

@alexsegura
Copy link

As a temporary workaround on iPhone you can use react-native-credit-card-input, it works

@jlkalberer
Copy link

So this delegate is causing an infinite loop: https://github.com/tipsi/tipsi-stripe/blob/master/ios/TPSStripe/TPSCardField.m#L32-L36

I commented these lines out and things started working..

I'm not sure what exactly the code there is supposed to do as I don't know Objective-C.

team55 pushed a commit to team55/tipsi-stripe that referenced this issue Feb 12, 2019
@vTrip
Copy link

vTrip commented Feb 20, 2019

Editing the file like the above commit from team55 seems to fix the problem for me. My app was unresponsive after attempting to focus into the tipsi text field.

This now lets me focus in however I cannot tap out and dismiss the keyboard.
My textfield is nested inside a scrollview that has keyboardShouldPersistTaps="handled"

Using "always" does not fix the issue either.

Devices my the fix has solved for are:

  • iPhone 8 Plus / SE / X / XR ... testing others
  • No testing for Android done yet

@vTrip
Copy link

vTrip commented Feb 20, 2019

Editing the file like the above commit from team55 seems to fix the problem for me. My app was unresponsive after attempting to focus into the tipsi text field.

This now lets me focus in however I cannot tap out and dismiss the keyboard.
My textfield is nested inside a scrollview that has keyboardShouldPersistTaps="handled"

Using "always" does not fix the issue either.

Devices my the fix has solved for are:

  • iPhone 8 Plus / SE / X / XR ... testing others

  • No testing for Android done yet

@jparr
Copy link

jparr commented Mar 5, 2019

This bug is also present in v7 on RN 56

@otajor
Copy link

otajor commented Apr 2, 2019

Still seeing this issue in v7.4.0 with RN 58.5

@thanhcuong1990
Copy link

@otajor For temporary fix you can use my fork.
"tipsi-stripe": "github:thanhcuong1990/tipsi-stripe#master"

@bithavoc
Copy link

I'm seeing this issue with "tipsi-stripe": "7.5.0", RN 0.59.5, iOS 12.2 on device only, simulator is fine.

Sometime it freezes, sometimes it crashes:

Screen Shot 2019-04-29 at 11 57 09 AM

Snippet:

<PaymentCardTextField
            ref={this.cardField}
            />

@ashfurrow
Copy link

We're seeing this on RN 0.59.2 since our upgrade from 0.57.7 (tipsi-stripe version 7.5.0). The PR #418, which fixed the issue, was closed without an explanation. Does anyone know why? Or can confirm they're using this fix in production? Thanks!

@rvera
Copy link

rvera commented Jun 26, 2019

So, is this going to get fixed?

@cybergrind
Copy link
Member

@ashfurrow / @rvera #418 didn't pass CI tests so we cannot merge it even if it fixes something it obviously breaks tests. Apparently, it is going to be fixed if someone submits proper PR that passes tests and add test for this case and that hasn't happened yet.
So if you feel like you can handle this we will appreciate PR

@ashfurrow
Copy link

@cybergrind Thank you for the response. I understand that you can't merge a PR that breaks tests, but the code in question is Objective-C and doesn't look like it's been touched in a few years and, without context around why the code is even there, it will be difficult for an OSS contributor to fix the bug and the tests.

Obviously this is Tipsi's library, and I do sincerely thank you all for sharing it with the open source community, so we can't expect you to fix this for us. Unfortunately, it seems like we're at an impasse; the OSS users who are seeing this bug will have to fork the library and apply the fix from #418. Thanks again for the open source library.

@cybergrind
Copy link
Member

cybergrind commented Jun 27, 2019

@ashfurrow it all is up to you =)

without context around why the code is even there, it will be difficult for an OSS contributor to fix the bug and the tests.

So we're all in the same situation. I don't have anyone who is familiar with this code right now and someone needs to dig into it and discover what is that all about.

@ashfurrow
Copy link

Yeah, I figured that might be the case :) It happens, I'll keep this on my backlog of things I'd like to fix someday when I get the time 😉

Saschamz added a commit to RedmindAB/tipsi-stripe that referenced this issue Jul 18, 2019
@fbartho
Copy link
Collaborator

fbartho commented Jul 23, 2019

In React-Native 45, they removed a deprecated API that <PaymentCardTextField /> was built on.

This commit: facebook/react-native@bc1ea54#diff-3e154f92c7ba4cb47e96785b9dadf3aa

The documentation says we need to support React-Native 40 or later, or we need to make another API breakage (Compatibility Docs)

I have a minimal fix that appears to work, but I'm not really set up to test this all the way back to React-Native 40.

I've opened a PR for comment: #508 /cc @mindlapse @cybergrind

fbartho added a commit to fbartho/tipsi-stripe that referenced this issue Jul 23, 2019
Fixes tipsi#408

React-Native removed support for the react(Will|Did)MakeFirstResponder APIs in this commit: facebook/react-native@bc1ea54#diff-3e154f92c7ba4cb47e96785b9dadf3aa
@nchase
Copy link

nchase commented Jul 25, 2019 via email

tamarabernad pushed a commit to BlueCallApp/tipsi-stripe that referenced this issue Aug 7, 2019
@bramski
Copy link
Contributor

bramski commented Aug 8, 2019

This is broken on RN 0.59.10 and tipsi-stripe 7.5.1, what do I need to do to get around/fix it? iOS fully locks up when users try to close the modal containing the payment text field.

@bramski
Copy link
Contributor

bramski commented Aug 8, 2019

Alright, this PR is old now and trying to use the fix PR breaks due to: viromedia/viro#558
I'll see if I can make an update PR to rebase this PR against tipsi-stripe which has moved ahead. I literally don't understand how tipsi-stripe moved ahead with new releases for RN without fixing this issue. Mind blown.

@fbartho
Copy link
Collaborator

fbartho commented Aug 8, 2019

@bramski -- I've fixed this in #508 (which is from a more-up-to-date master) -- we just need to get that PR Merged. I can send you a script to hot patch tipsi-stripe on npm install (post install) if you're interested.

@bramski
Copy link
Contributor

bramski commented Aug 8, 2019

I can try it @fbartho . But I tried using your fork locally and things were still broken so...

@bramski
Copy link
Contributor

bramski commented Aug 8, 2019

I rebased his branch and opened another PR: #521
I have to fix this right now because people can't pay for things and that is a serious problem.

fbartho added a commit that referenced this issue Aug 9, 2019
Fixes #408

React-Native removed support for the react(Will|Did)MakeFirstResponder APIs in this commit: facebook/react-native@bc1ea54#diff-3e154f92c7ba4cb47e96785b9dadf3aa
@moazkh60
Copy link

The issue is still there on 7.5.1 what is the final solution for this? When will you merge the PR with fixed issue.

@bramski
Copy link
Contributor

bramski commented Sep 19, 2019

@moazkh60 I can confirm this is fixed in 8.0.0-beta.7.

@amie-wilt
Copy link

I'm new to tipsi-stripe but heard/read great things about it so I was a little surprised by the issues I had getting the package installed and running successfully, but I have to say I'm outright baffled after running into this problem ☝️ almost immediately and then coming across this thread. If I'm not mistaken, there is one component feature in the library. I understand there are other methods that can be used but I still can't understand how the one and only component has been broken for so long and is still unresolved, especially since it's seems like so many offered up solutions/PRs. A little discouraging.

@bramski I tried 8.0.0-beta.7 and am seeing the following error, have you not seen this? Unfortunately I'm not very familiar with Objective-C.

Screen Shot 2019-09-27 at 9 36 54 AM

iOS: 12.3.1
RN: 0.60.5

@bramski
Copy link
Contributor

bramski commented Sep 27, 2019

@amie-wilt take your question to discord.
https://discordapp.com/channels/606076644922359834/606076644922359838
Looks like a build issue with the beta I haven't seen.

@fbartho
Copy link
Collaborator

fbartho commented Sep 27, 2019

@amie-wilt -- Unfortunately that issue is because you're not running a modern enough version of stripe-ios you may have integrated this through Cocoapods, or manually, but I recommend you upgrade to stripe-ios 17.0.1 -- there's a fix to support 17.0.2 in experimental but it hasn't been spun into a beta yet!

@unfrgivn
Copy link

Confirmed PaymentCardTextField working on 8.0.0-beta.8 with pod 'Stripe', '17.0.1'

RN 0.59.10
iOS 13.0

@0xch4z 0xch4z mentioned this issue Oct 10, 2019
3 tasks
rob5408 pushed a commit to rob5408/tipsi-stripe that referenced this issue Dec 20, 2019
askd added a commit to spiral-modules/tipsi-stripe that referenced this issue Jan 23, 2020
* Stripe AppInfo added with stripe-android, react-native & android upgrade

AppInfo is needed so that Stripe can identify the transactions that are created through tipsi-stripe

Along with this, the compile and target SDK versions for android have been bumped to v28, stripe-android has been upgraded to 9.3.5, the minSdkVersion has increased to v19 (required).

Example app changes:
- Android compile and target SDK change from 26 -> 28
- Android min SDK change from 16 -> 19
- Android multiDexEnabled true
- Android support libraries upgraded to v28
- React native upgraded to 0.59.10
- React upgraded to 16.8.6
- android.useDeprecatedNdk=true was removed since it is no longer supported.
- android.enableAapt2=false was removed since it is now the default
- Gradle build tools upgraded to 3.4.1.  Gradle wrapper upgraded to v5.5.

* Adding .circleci

* Stripe AppInfo and library upgrades

- CircleCI config (for android)
- Android - Compile SDK version increased from 26 to 28
- Android - Target SDK version increased from 26 to 28
- Android - Min SDK version increased from 16 to 19
- Android - stripe-android increased from 8.1.0 to 9.3.5
- Android - Added Stripe AppInfo to requests

Example app:
- Updated react-native to 0.59.10 from 0.45.0
- Updated react to 16.8.6 from 16.0.x
- Upgraded gradle

Tests:
- Updated test suite to use webdriver 5.x from 4.7.1
- Update appium to 1.14

* stripe-ios AppInfo initial config

* `managedAccountCurrency` is no longer relevant according to the migration guide.

* typo-fixes

* Update Stripe CardForm options to support the "name"-only option in the requiredBillingAddressFields-option

* Dynamically list supported ApplePay networks on this device & write documentation

* Switch eslint-config & allow rules that are already existing patterns in the codebase

* Add missing docs pages, and reorganize the sidebars a little bit

* Add prettier to format the rendered-docs-html making diffing easier, and render the current docs

* Upgrade Example Project to Stripe 16 & Cocoapods changed something

* misc test fix

* React-Native 59 for the Example App for iOS

* ApplePay example tweaks now that it's running

* Got the testapp changes working!

* Prettier Javascript Formatting

* Extract Deprecated Methods to a separate file

* Adds Android confirmPayment, authenticatePayment, createPaymentMethod

Note: This commit breaks iOS - a subsequent commit is needed
Added confirmPayment, authenticatePayment, createPaymentMethod bindings for src/Stripe.js
Upgrade to stripe-android:10.1.1

* Adds Android confirmSetupIntent and authenticateSetup

 Note: This commit breaks iOS - a subsequent commit is needed

* Android changes for confirming a payment intent, with test page

- Confirmation of a payment intent resolves with { status, paymentIntentId }
- status is one of 'CANCELED', 'FAILED', 'SUCCEEDED', 'TIMEDOUT', or 'UNKNOWN'
- test page requires 'STRIPE_BACKEND' env to be defined, and it should contain a URL with a trailing slash pointing to a deployment of https://github.com/mindlapse/example-tipsi-stripe-backend

* Android changes for confirming a payment intent, with test page (cont..)

Wiring in the new example app PaymentIntentScreen

* Prettier configs in subfolders

* Prettier Formatting

* Adds SetupIntentScreen and stripe-android:10.2.1 (contains setupintent fix)

* PaymentIntent demo page updated to include manual entry with the card widget

* Add some jsDocs

* TPSCardField fixes

* iOS: Stub-in new methods, tweak certain bits of lifecycle

* API changes

- Dropped support for 'returnURL' for now (until there is demand for it to be introduced along with proper demo/tests)
- Added experimental Promise handling for authenticateSetup and authenticatePayment
- Allow a payment intent to be confirmed with just the clientSecret (without requiring a payment method to be provided client side)

* iOS: Implement Serializers / Parsers for marshalling parameters/results across the RN Bridge + JSDoc

* JSDoc: Missed a type

* iOS: error case robustness

* iOS: implement authenticatePaymentIntent / authenticateSetupIntent

* Prettier Formatting for PaymentIntent/SetupIntent Test Screens

* Tweak confirmPayment/confirmSetup to check & process 3DSecure Actions

* React 16.9 componentWillMount deleted compatibility

* Get Travis to install Xcode10.3 & Node >= 8.3

* oraclejdk8 is not supported on Travis's Xenial boxes

* Apply suggestions from code review

PRFeedback!

* Update npm to try to fix error

* Fix field focus infinite recursion in keyboardWillShow on > RN 45

Fixes tipsi#408

React-Native removed support for the react(Will|Did)MakeFirstResponder APIs in this commit: facebook/react-native@bc1ea54#diff-3e154f92c7ba4cb47e96785b9dadf3aa

* Fix incorrect test js syntax

* Fixup some issues with ci for ios

* Prettier formatting

* Adds test cards to demo page

Test cards can be found here:

https://stripe.com/docs/testing

* Adding manual confirmation support for Payment Intents

* Merge fixes, updated npm run configure to list rewrite envs

* Doc update - adds Objects > PaymentMethod

* Have new setup & payment intent methods return the status off of the intent itself

* example app: PaymentIntentScreen updates

* Added an extra test card (has no 3ds & always declines)

* Example app: automatic flow error handling update

* Additional test cards

* AddCardDialogFragment changes to support PaymentMethods

* Remove support for sourceId from confirmPayment

* tipsi-stripe iOS Native SDK version to 16.0.6

adrien.teulade-pod-point / timrc discussed this in Discord

* Remove Signatures that React-Native can't resolve at runtime

these are typedefs that revert to NSStrings at runtime, but that means that the name doesn't exist which then fails to pass their check here: https://github.com/facebook/react-native/blob/c20070f10458d48d6ac1eaac49e681e932bfb9fd/React/Base/RCTParserUtils.m#L119

* Example: Prettier (JS Formatting)

* Tighten up some types as per discussion

Discussion Thread: https://github.com/tipsi/tipsi-stripe/pull/515/files#r310823098

* Android: Ensure useStripeSDK is always set to true

* Adds returnURL to confirm calls and 'Intent' suffix to the Stripe.js interface

* Token fix

* Missed prettier-jsx formatting

* Robustness in CardParams parsing from tokens

* jsdoc cardparam.token

* iOS: API Naming Consistency

* iOS: Enable recommended modern iOS Warnings

* Fixup reasonable lint exceptions in the example app

* eslint-based fixes

* Example-app: API Naming Consistency with Native

* PaymentIntent requires_payment_method -> requires_paymentMethod based on iOS

* iOS, JS: fixup IntentStatus values to match Server Docs

* Disabling authenticateSetupIntent until we need it

* PaymentIntent guide - doc update

* Small fix to example app

* Roll 8.0.0-beta.1

* lint & prettier changes

* iOS Fixup `paymentRequestWithCardForm` for stripe-ios Breaking API Changes

* Add metadata support on Android

* Fix JSDocs around PaymentMethod customerId

* JSDoc the PaymentMethodCard Type -- especially Brand

* Misc consistency

* iOS: Don't assert if the paymentMethod is not provided in this helper (reused when a paymentMethodId might be provided)

* iOS: Use the official way to bridge CardBrands to Strings

* Android: Attempt to convert CardBrands instead of exposing the lowercased constant values

* Restored brand slugs for PaymentMethod card serialization

* Change CardBrand handling to expose API differences in Stripe Constant-values

* Card-based APIs expose brand as a Human Presentable Value -- eg "American Express"
* Newer, PaymentMethod:Card-based APIs expose brand as a brand-slug Identifier -- eg "amex"

* Add display utilities around card brands

* JSDoc the PaymentCardTextField Component

* Doc update, re: PaymentIntent API

* Roll 8.0.0-beta.2

* Fix iOS constant-key macro

* stripe-ios 16.0.7

* Removed support for token creation in stripe.paymentRequestWithCardForm

Only PaymentMethod creation is supported

* Removed support for token creation in stripe.paymentRequestWithCardForm

* PaymentCardTextField component, event bubbling issue

* Further Improve JSDocs

* Roll out 8.0.0-beta.3

* Updated changelog & appinfo

* iOS Stripe-AppInfo version to 8.x

* provide a status of unknown in the error state of serializing (Payment/Setup)IntentResults

This matches iOS

* iOS Changelog tweaks

* Make our post-link-ios script suggest stripe-ios 16.x

* Serialize `paymentMethodId` when resolving confirmSetupIntent/authenticateSetupIntent

Related feature request for Android PaymentIntents: stripe/stripe-android#1445

* stripe-android 10.4.0 & paymentMethodId consistency!

* Upgraded stripe-android to 10.4.0 and added paymentMethodId

* nil/null robustness (in case users pass null for this parameter)

* Parse & use the returnURL if provided for relevant APIs

* Quick-Document the returnURL property

* Better Connect Stripe Error Messages through to React-Native

* Roll out 8.0.0-beta.4

* Enable android pay in example app

* Docs: add saving card documentation

* Docs: build new version

* Finish up fixing the PaymentCardTextField Component iOS Lockup

Moots tipsi#508 tipsi#521

* iOS: Support using multiple Stripe accounts with 3DSecure

* Updated confirmSetupIntent error codes

* iOS: Android Error Consistency re: authenticationFailed

* Example app screen improvements

* Expose setStripeAccount to JS (Enable Stripe Connect accounts)

* Fix incorrect method access. Add usage and code to example app

* Roll out 8.0.0-beta.5

* iOS: Fix happy path for cards

* Roll out 8.0.0-beta.6

* iOS: Remove assert forcing paymentMethod/id to be passed to confirmPaymentIntent

Instead of forcing them to re-submit the same paymentMethod/paymentMethodId at the time of confirmPaymentIntent, the user can instead attach the paymentMethod/id on the backend before calling confirm

* Example app - added missing lines

* Fix for <STRIPE_ACCOUNT>

* Revert "Fix for <STRIPE_ACCOUNT>"

This reverts commit 7e61f1a.

* Revert 1a5a5cc

* Revert ee98528

* PropTypes: Allow omitting paymentMethod/paymentMethodId on confirmPaymentIntent

Fixes: tipsi#536

* iOS: Misc readability

* iOS: Treat `requires_capture` as a successful confirmPaymentIntent status

* Move the PaymentIntentStatusRequiresCapture check to the confirmPaymentIntent method

* confirmPaymentIntent: clean up wrong enum copy-paste error

* iOS: Default to useStripeSDK = true

* iOS: Clean up some unnecessary redundant returnURL parsing

* To align with iOS, the confirmPaymentIntent promise is rejected unless the payment intent ends up in `succeeded` or `requires_capture`

* If the resultingStatus of the PaymentIntent is either `succeeded`, or `requires_capture` then resolve the promise with `{ status: 'succeeded', ... }`
* If the resultingStatus of the PaymentIntent is either `canceled`, `requires_action`, or `requires_confirmation`, then consider the payment intent to be `cancelled` and reject the promise.
* Otherwise, consider the payment intent to be `failed` and reject the promise

* Roll out 8.0.0-beta.7

* Upgrade to latest stripe-android on the 10.4 branch

* Allow/Suggest stripe-ios @ 17.0.1 or later

* Android: Allow RequiresConfirmation to be a successful outcome

* Logic cleanup

* Roll out 8.0.0-beta.8

* Switch Statement Robustness -- stripe-ios 17.0.2 compatibility

* Prettier Formatting

* Migration doc

* Roll 8.0.0-beta.9

* [fix] AndroidX

Co-authored-by: Dave MacDonald <mindlapse@users.noreply.github.com>
Co-authored-by: Frederic Barthelemy <git@fbartho.com>
Co-authored-by: Kirill Pinchuk <cybergrind@gmail.com>
Co-authored-by: André Perdigão <andrepcg@gmail.com>
acmeyer added a commit to livelyhood/tipsi-stripe that referenced this issue Jun 12, 2020
* Stripe AppInfo added with stripe-android, react-native & android upgrade

AppInfo is needed so that Stripe can identify the transactions that are created through tipsi-stripe

Along with this, the compile and target SDK versions for android have been bumped to v28, stripe-android has been upgraded to 9.3.5, the minSdkVersion has increased to v19 (required).

Example app changes:
- Android compile and target SDK change from 26 -> 28
- Android min SDK change from 16 -> 19
- Android multiDexEnabled true
- Android support libraries upgraded to v28
- React native upgraded to 0.59.10
- React upgraded to 16.8.6
- android.useDeprecatedNdk=true was removed since it is no longer supported.
- android.enableAapt2=false was removed since it is now the default
- Gradle build tools upgraded to 3.4.1.  Gradle wrapper upgraded to v5.5.

* Adding .circleci

* Stripe AppInfo and library upgrades

- CircleCI config (for android)
- Android - Compile SDK version increased from 26 to 28
- Android - Target SDK version increased from 26 to 28
- Android - Min SDK version increased from 16 to 19
- Android - stripe-android increased from 8.1.0 to 9.3.5
- Android - Added Stripe AppInfo to requests

Example app:
- Updated react-native to 0.59.10 from 0.45.0
- Updated react to 16.8.6 from 16.0.x
- Upgraded gradle

Tests:
- Updated test suite to use webdriver 5.x from 4.7.1
- Update appium to 1.14

* stripe-ios AppInfo initial config

* `managedAccountCurrency` is no longer relevant according to the migration guide.

* typo-fixes

* Update Stripe CardForm options to support the "name"-only option in the requiredBillingAddressFields-option

* Dynamically list supported ApplePay networks on this device & write documentation

* Switch eslint-config & allow rules that are already existing patterns in the codebase

* Add missing docs pages, and reorganize the sidebars a little bit

* Add prettier to format the rendered-docs-html making diffing easier, and render the current docs

* Upgrade Example Project to Stripe 16 & Cocoapods changed something

* misc test fix

* React-Native 59 for the Example App for iOS

* ApplePay example tweaks now that it's running

* Got the testapp changes working!

* Prettier Javascript Formatting

* Extract Deprecated Methods to a separate file

* Adds Android confirmPayment, authenticatePayment, createPaymentMethod

Note: This commit breaks iOS - a subsequent commit is needed
Added confirmPayment, authenticatePayment, createPaymentMethod bindings for src/Stripe.js
Upgrade to stripe-android:10.1.1

* Adds Android confirmSetupIntent and authenticateSetup

 Note: This commit breaks iOS - a subsequent commit is needed

* Android changes for confirming a payment intent, with test page

- Confirmation of a payment intent resolves with { status, paymentIntentId }
- status is one of 'CANCELED', 'FAILED', 'SUCCEEDED', 'TIMEDOUT', or 'UNKNOWN'
- test page requires 'STRIPE_BACKEND' env to be defined, and it should contain a URL with a trailing slash pointing to a deployment of https://github.com/mindlapse/example-tipsi-stripe-backend

* Android changes for confirming a payment intent, with test page (cont..)

Wiring in the new example app PaymentIntentScreen

* Prettier configs in subfolders

* Prettier Formatting

* Adds SetupIntentScreen and stripe-android:10.2.1 (contains setupintent fix)

* PaymentIntent demo page updated to include manual entry with the card widget

* Add some jsDocs

* TPSCardField fixes

* iOS: Stub-in new methods, tweak certain bits of lifecycle

* API changes

- Dropped support for 'returnURL' for now (until there is demand for it to be introduced along with proper demo/tests)
- Added experimental Promise handling for authenticateSetup and authenticatePayment
- Allow a payment intent to be confirmed with just the clientSecret (without requiring a payment method to be provided client side)

* iOS: Implement Serializers / Parsers for marshalling parameters/results across the RN Bridge + JSDoc

* JSDoc: Missed a type

* iOS: error case robustness

* iOS: implement authenticatePaymentIntent / authenticateSetupIntent

* Prettier Formatting for PaymentIntent/SetupIntent Test Screens

* Tweak confirmPayment/confirmSetup to check & process 3DSecure Actions

* React 16.9 componentWillMount deleted compatibility

* Get Travis to install Xcode10.3 & Node >= 8.3

* oraclejdk8 is not supported on Travis's Xenial boxes

* Apply suggestions from code review

PRFeedback!

* Update npm to try to fix error

* Fix field focus infinite recursion in keyboardWillShow on > RN 45

Fixes tipsi#408

React-Native removed support for the react(Will|Did)MakeFirstResponder APIs in this commit: facebook/react-native@bc1ea54#diff-3e154f92c7ba4cb47e96785b9dadf3aa

* Fix incorrect test js syntax

* Fixup some issues with ci for ios

* Prettier formatting

* Adds test cards to demo page

Test cards can be found here:

https://stripe.com/docs/testing

* Adding manual confirmation support for Payment Intents

* Merge fixes, updated npm run configure to list rewrite envs

* Doc update - adds Objects > PaymentMethod

* Have new setup & payment intent methods return the status off of the intent itself

* example app: PaymentIntentScreen updates

* Added an extra test card (has no 3ds & always declines)

* Example app: automatic flow error handling update

* Additional test cards

* AddCardDialogFragment changes to support PaymentMethods

* Remove support for sourceId from confirmPayment

* tipsi-stripe iOS Native SDK version to 16.0.6

adrien.teulade-pod-point / timrc discussed this in Discord

* Remove Signatures that React-Native can't resolve at runtime

these are typedefs that revert to NSStrings at runtime, but that means that the name doesn't exist which then fails to pass their check here: https://github.com/facebook/react-native/blob/c20070f10458d48d6ac1eaac49e681e932bfb9fd/React/Base/RCTParserUtils.m#L119

* Example: Prettier (JS Formatting)

* Tighten up some types as per discussion

Discussion Thread: https://github.com/tipsi/tipsi-stripe/pull/515/files#r310823098

* Android: Ensure useStripeSDK is always set to true

* Adds returnURL to confirm calls and 'Intent' suffix to the Stripe.js interface

* Token fix

* Missed prettier-jsx formatting

* Robustness in CardParams parsing from tokens

* jsdoc cardparam.token

* iOS: API Naming Consistency

* iOS: Enable recommended modern iOS Warnings

* Fixup reasonable lint exceptions in the example app

* eslint-based fixes

* Example-app: API Naming Consistency with Native

* PaymentIntent requires_payment_method -> requires_paymentMethod based on iOS

* iOS, JS: fixup IntentStatus values to match Server Docs

* Disabling authenticateSetupIntent until we need it

* PaymentIntent guide - doc update

* Small fix to example app

* Roll 8.0.0-beta.1

* lint & prettier changes

* iOS Fixup `paymentRequestWithCardForm` for stripe-ios Breaking API Changes

* Add metadata support on Android

* Fix JSDocs around PaymentMethod customerId

* JSDoc the PaymentMethodCard Type -- especially Brand

* Misc consistency

* iOS: Don't assert if the paymentMethod is not provided in this helper (reused when a paymentMethodId might be provided)

* iOS: Use the official way to bridge CardBrands to Strings

* Android: Attempt to convert CardBrands instead of exposing the lowercased constant values

* Restored brand slugs for PaymentMethod card serialization

* Change CardBrand handling to expose API differences in Stripe Constant-values

* Card-based APIs expose brand as a Human Presentable Value -- eg "American Express"
* Newer, PaymentMethod:Card-based APIs expose brand as a brand-slug Identifier -- eg "amex"

* Add display utilities around card brands

* JSDoc the PaymentCardTextField Component

* Doc update, re: PaymentIntent API

* Roll 8.0.0-beta.2

* Fix iOS constant-key macro

* stripe-ios 16.0.7

* Removed support for token creation in stripe.paymentRequestWithCardForm

Only PaymentMethod creation is supported

* Removed support for token creation in stripe.paymentRequestWithCardForm

* PaymentCardTextField component, event bubbling issue

* Further Improve JSDocs

* Roll out 8.0.0-beta.3

* Updated changelog & appinfo

* iOS Stripe-AppInfo version to 8.x

* provide a status of unknown in the error state of serializing (Payment/Setup)IntentResults

This matches iOS

* iOS Changelog tweaks

* Make our post-link-ios script suggest stripe-ios 16.x

* Serialize `paymentMethodId` when resolving confirmSetupIntent/authenticateSetupIntent

Related feature request for Android PaymentIntents: stripe/stripe-android#1445

* stripe-android 10.4.0 & paymentMethodId consistency!

* Upgraded stripe-android to 10.4.0 and added paymentMethodId

* nil/null robustness (in case users pass null for this parameter)

* Parse & use the returnURL if provided for relevant APIs

* Quick-Document the returnURL property

* Better Connect Stripe Error Messages through to React-Native

* Roll out 8.0.0-beta.4

* Enable android pay in example app

* Docs: add saving card documentation

* Docs: build new version

* Finish up fixing the PaymentCardTextField Component iOS Lockup

Moots tipsi#508 tipsi#521

* iOS: Support using multiple Stripe accounts with 3DSecure

* Updated confirmSetupIntent error codes

* iOS: Android Error Consistency re: authenticationFailed

* Example app screen improvements

* Expose setStripeAccount to JS (Enable Stripe Connect accounts)

* Fix incorrect method access. Add usage and code to example app

* Roll out 8.0.0-beta.5

* iOS: Fix happy path for cards

* Roll out 8.0.0-beta.6

* iOS: Remove assert forcing paymentMethod/id to be passed to confirmPaymentIntent

Instead of forcing them to re-submit the same paymentMethod/paymentMethodId at the time of confirmPaymentIntent, the user can instead attach the paymentMethod/id on the backend before calling confirm

* Example app - added missing lines

* Fix for <STRIPE_ACCOUNT>

* Revert "Fix for <STRIPE_ACCOUNT>"

This reverts commit 7e61f1a.

* Revert 1a5a5cc

* Revert ee98528

* PropTypes: Allow omitting paymentMethod/paymentMethodId on confirmPaymentIntent

Fixes: tipsi#536

* iOS: Misc readability

* iOS: Treat `requires_capture` as a successful confirmPaymentIntent status

* Move the PaymentIntentStatusRequiresCapture check to the confirmPaymentIntent method

* confirmPaymentIntent: clean up wrong enum copy-paste error

* iOS: Default to useStripeSDK = true

* iOS: Clean up some unnecessary redundant returnURL parsing

* To align with iOS, the confirmPaymentIntent promise is rejected unless the payment intent ends up in `succeeded` or `requires_capture`

* If the resultingStatus of the PaymentIntent is either `succeeded`, or `requires_capture` then resolve the promise with `{ status: 'succeeded', ... }`
* If the resultingStatus of the PaymentIntent is either `canceled`, `requires_action`, or `requires_confirmation`, then consider the payment intent to be `cancelled` and reject the promise.
* Otherwise, consider the payment intent to be `failed` and reject the promise

* Roll out 8.0.0-beta.7

* Upgrade to latest stripe-android on the 10.4 branch

* Allow/Suggest stripe-ios @ 17.0.1 or later

* Android: Allow RequiresConfirmation to be a successful outcome

* Logic cleanup

* Roll out 8.0.0-beta.8

* Switch Statement Robustness -- stripe-ios 17.0.2 compatibility

* Prettier Formatting

* Add setStripeAccount support.

Adds Stripe Connect Support.
new JS method `setStripeAccount` which can be an account id or null.

* Migration doc

* Upgrade tipsi-android to 1.4.6

See: stripe/stripe-android#1654

* Roll 8.0.0-beta.9

* Fix extracting billingDetails

* Fixed compilation error for 8.0.0.beta9 due to fpx issue

* Mark an unsupported entry with a comment

* Fix build on xcode 11.4

See stripe/stripe-ios#1526

* Update npmignore

* Update for AndroidX (#2)

* Saving before trying android studio migrate

* AndroidX conversion tweaks

* AndroidX conversion tweaks

Co-authored-by: Tomas Maly <tmaly1980@gmail.com>

Co-authored-by: Dave MacDonald <mindlapse@gmail.com>
Co-authored-by: Frederic Barthelemy <git@fbartho.com>
Co-authored-by: Kirill Pinchuk <cybergrind@gmail.com>
Co-authored-by: Dave MacDonald <mindlapse@users.noreply.github.com>
Co-authored-by: André Perdigão <andrepcg@gmail.com>
Co-authored-by: Bram Whillock <bramski@gmail.com>
Co-authored-by: Igor Kozlovsky <igor.lemon.kozlovsky@gmail.com>
Co-authored-by: Max Hung <info@maxhung.co.nz>
Co-authored-by: Torres Yang <yangguanhua@gmail.com>
Co-authored-by: Tomas Maly <tmaly1980@gmail.com>
renabriseno68 added a commit to renabriseno68/android-flutter-tipsi-stripe that referenced this issue Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet