createSourceWithParams - threeDSecure - There was an unexpected error
See original GitHub issueHello, I use tipsie-stripe
in my react-native app, it work well, and now I try to add threeDSecure
.
My actuel behavior: I get a token by using paymentRequestWithCardForm
that I use to create a source (saved to a user in my backend). And then I use the card_id
as a source for charge.
// now
confirmOrder = () => {
const { order, card } = this.props;
// request to my backend that do the charge request to stripe
this.props.confirmOrder({
order_id: order.id,
source_id: card.id,
});
};
What I try to do: use createSourceWithParams
with threeDSecure
to get a 3D secure source_id
for the charge.
// what I try to do
confirmOrder = async () => {
const { order, card } = this.props;
try {
const source = await stripe.createSourceWithParams({
type: 'threeDSecure',
amount: order.price_in_cents,
currency: 'eur',
returnURL: 'accorlocal://stripe-redirect',
card: card.id,
});
// request to my backend that do the charge request to stripe
this.props.confirmOrder({
order_id: order.id,
source_id: source.id,
});
} catch (error) {
console.log(JSON.stringify(error));
}
};
I try with 3DSecure Stripe test cards, the Stripe test page for authorize 3DSecure work well, the redirect button open my app. But after I always get this error on iOS :
{
"framesToPop": 1,
"code": "EUNSPECIFIED",
"nativeStackIOS": [
"0 mygreeanpp 0x00000001081335c6 RCTJSErrorFromCodeMessageAndNSError + 134",
"1 mygreeanpp 0x00000001080c2133 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.218 + 179",
"2 mygreeanpp 0x000000010837790f __61-[TPSStripeManager createSourceWithParams:resolver:rejecter:]_block_invoke_3 + 143",
"3 mygreeanpp 0x0000000107ea5328 __60-[STPSourcePoller cleanupAndFireCompletionWithSource:error:]_block_invoke + 152",
"4 libdispatch.dylib 0x000000011233373b _dispatch_call_block_and_release + 12",
"5 libdispatch.dylib 0x0000000112334779 _dispatch_client_callout + 8",
"6 libdispatch.dylib 0x000000011233e778 _dispatch_main_queue_callback_4CF + 1279",
"7 CoreFoundation 0x000000010f197c99 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9",
"8 CoreFoundation 0x000000010f15bea6 __CFRunLoopRun + 2342",
"9 CoreFoundation 0x000000010f15b30b CFRunLoopRunSpecific + 635",
"10 GraphicsServices 0x0000000113d43a73 GSEventRunModal + 62",
"11 UIKit 0x000000010a66c0b7 UIApplicationMain + 159",
"12 mygreeanpp 0x0000000107d150cf main + 111",
"13 libdyld.dylib 0x00000001123a9955 start + 1",
"14 ??? 0x0000000000000001 0x0 + 1"
],
"domain": "com.stripe.lib",
"userInfo": {
"com.stripe.lib:ErrorMessageKey": "There was an error connecting to Stripe.",
"NSLocalizedDescription": "There was an unexpected error -- try again in a few seconds"
}
}
react-native 0.55.4
tipsi-stripe 5.2.1
pod Stripe 11.2.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Source · tipsi-stripe
A source object returned from creating a source (via createSourceWithParams ) with the Stripe API.
Read more >Stripe SCA need to handle next action - Stack Overflow
Error Domain=STPPaymentHandlerErrorDomain Code=1 "There was an unexpected error -- try again in a few seconds" ...
Read more >Payement error “payment_intent_unexpected_state”
I noticed it's a “big amont” (almost 2400€), I don't know if that could be an issue but my client has already received...
Read more >3D Secure verification failed error while making a payment
I'm receiving a 3D Secure verification failed error in cart. ... If you see an error related to the 3D Secure verification, the...
Read more >Card authentication and 3D Secure | Stripe Documentation
Typically, you direct the customer to an authentication page on their bank's website, ... If a card doesn't support 3DS or an error...
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
Was able to get it working for both platforms here https://github.com/tipsi/tipsi-stripe/pull/310, lets test and discuss the fixes ! 😄 https://github.com/tipsi/tipsi-stripe/pull/310
@isnifer Yes I commented on the PR #310