Missing tokenId from stripe.paymentRequestWithCardForm() response
See original GitHub issueBefore 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
stripe.paymentRequestWithCardForm()
is no longer returning tokenId
It returns the following:
billingDetails: {...}
card: {...}
created: 1575564470
customerId: null
id: "pm_..."
livemode: false
type: "card"
tokenId
returns correctly if I hardcode the card details using stripe.createTokenWithCard({number: '4242424242424242', expMonth: 11, expYear: 27, cvc: '223'})
I would ideally prefer to use the prebuilt component since it handles validation etc.
Code To Reproduce Issue (Good To Have)
stripe.paymentRequestWithCardForm()
.then(res => {
console.log(res.tokenId) <=== undefined
})
.catch(error => {
console.log(error)
})
Environment
tipsi-stripe
version: 8.0.0-beta.7- Last
tipsi-stripe
version where the issue was not reproduced (if applicable): Can’t reproduce even when rolling back to stable npm version - iOS or Android: Android
- OS version: 9
- React-Native version: 0.61.2
- (Android only)
com.google.firebase:firebase-core
version: N/A - (Android only)
com.google.android.gms:play-services-base
version:
Links to logs and sources
For Android
, please provide the following sections from android/app/build.gradle
:
- android.compileSdkVersion 28
- android.buildToolsVersion 28.0.3
- android.defaultConfig.minSdkVersion 19
- android.defaultConfig.targetSdkVersion 28
- android.defaultConfig.multiDexEnabled (if exists) Y
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
React Native Stripe Firebase - Test token working but test card ...
The solution was to change: setToken(token). to setToken(token.tokenId).
Read more >Error codes | Stripe Documentation
The bank account number provided is invalid (e.g., missing digits). ... Check the disputes documentation to learn how to respond to the dispute....
Read more >Stripe API reference – Tokens – curl
Creates a single-use token that represents a credit card's details. This token can be used in place of a credit card with any...
Read more >Create a card token – curl - Stripe API reference
Creates a single-use token that represents a credit card's details. This token can be used in place of a credit card with any...
Read more >Stripe API reference – Errors – curl
Stripe uses conventional HTTP response codes to indicate the success or ... Codes in the 5xx range indicate an error with Stripe's servers...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FIXED
paymentRequestWithCardForm()
now returns the payment method token (response.id
) rather than the card token (response.tokenId
) so there is now no need to pass the card token tocreatePaymentMethod()
in order to retrieve the payment method token.Hi I am struggling with same in v8.0.0-beta.10 for getting token. But i am receiving payment method id. e.g looking for “tok_XXXX” but getting “pm_XXXX”
And Backend(PHP) is looking for “tok_XX” to complete the payment, so payment is failing at backend.
Please guide me for same to get it worked.
Thanks.