#teckqueen-react-native
1 messages ยท Page 1 of 1 (latest)
If there is any other information needed, I am happy to provide. I wasn't sure what was all needed.
Are you getting any errors when the Payment Sheet tries to pop up?
I'm not the most familiar with test flight, but let me see if there's anyone else who could help
Okay, ohhh do you think its test flight that could be the issue?
Or do I not have my payment sheet set up right?
Okay, thank you
my guess would be that it's related to test flight, but i'm not really sure
Okay, no worries. Will the next person just pop in this same thread ?
Yes, someone else would hop in here - no need to create a new thread
Okay fantastic. Thank you
Just a quick question - with test flight, are all your keys in the same mode? Like you're consistently using pk_test_xxx and sk_test_xxx keys?
Yes
pk_test and sk_test - sk_test is saved on our server side
And I have pk_test in my app
and do you mind also sharing a Payment Intent ID that didn't work for you?
Yes
Would it be under request: { id: ?
Request
{
"id": "evt_3KakUCGP9q49OSNT1Si4tonp",
"object": "event",
"api_version": "2020-08-27",
"created": 1646674604,
"data": {
"object": {
"id": "pi_3KakUCGP9q49OSNT1OXRzstI",
"object": "payment_intent",
"amount": 51,
"amount_capturable": 0,
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
"object": "list",
"data": [
],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_3KakUCGP9q49OSNT1OXRzstI"
},
"client_secret": "pi_3KakUCGP9q49OSNT1OXRzstI_secret_GP3LknfxwUEFWhvXr967MWFb4",
"confirmation_method": "automatic",
"created": 1646674604,
"currency": "usd",
"customer": null,
"description": "MuscoVision Access Pass - Mobile - 1 Day Pass",
"invoice": null,
"last_payment_error": null,
"livemode": false,
"metadata": {
"userID": "08991279-ad61-47a3-a4c4-9929f7b85c8a",
"userEmail": "elyse.segebart@musco.com",
"passID": "prod_LDc08iccw0VAnG"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"processing": null,
"receipt_email": "elyse.segebart@musco.com",
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "requires_payment_method",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": "req_ZFup2GGYQSFIuu",
"idempotency_key": "318afafa-d50c-4e8d-a571-1602d347e392"
},
"type": "payment_intent.created"
Here is the entire object
There are several IDs in here, so I wasn't sure which one
It's the pi_xxx ID - pi_3KakUCGP9q49OSNT1OXRzstI
Okay perfect
Hey @lavish fulcrum , I'm stepping in here for @lone wren. I'm getting caught up but not the most familiar with React Native... I'm also checking with a colleague for thoughts here and I'll circle back.
Okay, thank you so much.
@lavish fulcrum hello, pairing with @jolly spade on this, reading up
THank you!
can you try something out for me?
I think we should be able to repro this on your simulator too (possibly)
can you log out the PaymentIntent, Ephemeral Key and Customer ID used to initialize PaymentSheet when it doesn't open?
Okay
I don't use customer id or ephemeral key
Payment Intent pi_3KanNfGP9q49OSNT0SGwTRjb_secret_9bouGzASpIbFcz58KLYlcxSk1
I don't have an iOS simulator either so I just have to run it on my test device
Do I need a customer ID or ephemeral key?
Do I need a customer ID or ephemeral key?
only if you're initializing PaymentSheet with it! but you said you are not?
ah
I am trying to open my payment sheet on ios beta build, yes
just to confirm, I think you clarified it earlier to karbi but your Testflight is running on your testmode API keys right?
nope API keys are fine. Thinking..
can you show me a PaymentIntent ID from simulator, where PaymentSheet does work ?
pi_3KanNfGP9q49OSNT0SGwTRjb_secret_9bouGzASpIbFcz58KLYlcxSk1
This was one of them
PaymentSheet opens with that PaymentIntent? I assume it confirms as well?
I am not actually sure
That was the intent I received back and then the payment sheet opened up
But when I submit my app to the app store, the payment sheet no longer opens
We have it in beta with test flight, and then when I load it onto my ios device, the sheet no longer opens
I haven't been able to reproduce it not opening with expo because expo doesnt support apple pay. So it just pulls up normal card info
Okay, that's what I was wondering. I check for apple pay being supported, and when i put alerts in - i get back that apple pay supported is true
Question - when you use apple pay, do you have to presentApplePay(0 first and then get the client secret?
And with the regular card payment you init payment sheet, get secret and present payment sheet?
I was wondering if maybe I am doing this out of order?
actually, no, if you're using PaymentSheet, Apple Pay is present as an option in there.
presentPApplePay() is for a standalone Apple Pay button with ApplePayContext, so I'd expect you use either PaymentSheet, or ApplePayContext
so if you're doing both, that isn't right (unless I'm missing something)
Ohhhhh dang
yes I am doing both
But it still doesnt solve my problem
I added in the apple pay after it wouldnt open
๐ฆ
so let's take it step by step
let's remove all STPApplePayContext code
Okay
also random but how are you making and testing the TestFlight changes so quickly? my understanding was that it takes >30 mins no?
can you share code for how you're initializing and presenting PaymentSheet in your app?
just those snippets, not your whole component
No I am not making and testing the test flight changes quickly at all
they do take 30 minutes
And I have been spending 30-60 min every build just to try something and have it fail again lol
I am just saying I -know- that it wasn't owrking before so that's why i added in apple pay code
ah gotcha, yeah was just curious how you were testing this since TestFlight takes a bit to get your app on
I have an iphone 7 testing device
And expo uses metro builder where i can scan a qr code and test it on my device
but for test flight, no it takes 30-60 min
ah yeah there's some crazy magic that Metro QR code scanning does, I'm barely versed in it
ok so just to confirm, it isn't working on your iPhone 7 device either right? i.e. PaymentSheet doesn't pop up?
When I use expo to load it on here, dev environment, its fine. Payment sheet pops up
When I submit it to test flight and load it on to my phone, payment sheet no longer pops up
Okay I have removed all apple code
And my payment sheet is popping up on my test device with test build
pi_3Kao5uGP9q49OSNT1HX4gLAs_secret_TkNZcUl8APIFkXT9sqtoJsilQ
I am getting the payment intent back
I can make a purchase completely and thoroughly on my test environment
mind sharing the code here: #950477877625913445 message
just the Stripe <> PaymentSheet related RN code
can you share code for how you're initializing and presenting PaymentSheet in your app?
Yes totally you sent me a link and I dont know where its going
it was a link to a msg I sent earlier in this thread
you can put three back ticks `
like
test()
can you share just the initPaymentSheet() function
It doesnt let me send when i use the back ticks
initPaymentSheet({
paymentIntentClientSecret: data.client_secret,
customFlow: false,
merchantDisplayName: 'MuscoVision',
style: 'stripe',
applePay: true,
merchantCountryCode: 'US',
})
There you go
paymentIntentClientSecret: data.client_secret,
customFlow: false,
merchantDisplayName: 'MuscoVision',
style: 'stripe',
applePay: true,
merchantCountryCode: 'US',
})```
There we go got it lol
Then if you are using payment sheet - how does it know to put the apple pay button in there?
how does it know to put the apple pay button in there?
if you pass applePay: true it displays Apple Pay on the PaymentSheet if the device supports it
AHH okay
So the payment sheet that pops up has a yellow box that says "Test Mode"
If that's any other help for you
1/ are you handling the result of that async function call initPaymentSheet() ?
like var obj = await initPaymentSheet(...) ?
if not, can you add that to your Testflight code and log out the stringified obj to like a label on the screen?
2/ also, remove all the parameters from your initPaymentSheet() call and just leave
initPaymentSheet({
paymentIntentClientSecret: data.client_secret,
})
who is running your TestFlight build then? like the one where PaymentSheet is not working?
I am running test flight.
But I cannot do any logging.
Because its a beta build.
And the build would take 30 min to make to get you an alert with the data you're asking
Do you want me to do that and then message you back tomrorow?
yep I know logging won't work which is why either throwing up a UIAlertView or writing to a label on the screen works as an alternative
Okay perfect.
Is it okay if I message you back in the morning? I have to take off here for an appointment soon.
yes tomm works, you can write a msg in the main #dev-help channel asking the developers here to reopen this thread: #dev-help message
so we can consolidate everything here
please try out both 1/ and 2/ in your beta build
so we can try rule out if Apple Pay impacts it via 2/
Okay fantastic
Hello. Re-opened this
I do, so I am currently making another build as we speak to get more alerts since I realized the build I made yesterday didn't have more alerts that I wanted.
The init payment sheet object you asked me to strip down has paymentIntentClientSecret : clientSecret only
And when it returns, the result comes back as an object with with "paymentOptions" : undefined in it
I am currently making a build with an object alert that will tell me the entire object after I try to open presentPaymentSheet - that may be more helpful for you '
ah great, thank you
Whew, this is quite the interesting problem lol
So it may take about another 20-30min thank you for reopening this, I will let you know when I get it done and loaded
When I loaded the build I made this morning, I clicked the thing I wanted to buy and nothing else popped up for me, so I am hoping that the object has something in it.
Some sort of clue
yeah I'm hoping that too
its hard cause of the expo complexity, without expo it would be easier to repro this on a device without going the whole Testflight route
Right, I understand.
Ok we are finally about done. About 10 min more. Just submitting and approving.
I guess its a little slower than that since its close to lunch.. its submitting. Just waiting for it to process, answer questions, and then load on to my device.
OKAY
Got it
I am very excited to find this solution
Okay so I get {} returned after initPaymentSheet({ paymentIntentClientSecret: data.client_secret }) -> which I confirmed the client secret is making it to the presentPaymentSheet
And then nothing
Omgsh dang it!!!
Its like the build never gets to open the present payment sheet or its not even making it there
In my dev environment - it DOES make it threre and I get the WHOLE object printed if I cancel the payment - otherwise it just returns empty when its working. But in my test flight build - its not even getting there
My test flight beta build is not even opening the payment sheet still or even trying.
๐ ahhhhh
It's slowly coming back up, but responses might be slow since they're still working on restoring full service
@lavish fulcrum I'm wondering this could be one of two things:
1/ your code isn't getting to calling presentPaymentSheet() so I'd log an Alert view immediately before you call that function
2/ my other thing is that presentPaymentSheet() is silently failling somewhere internally and doing ~nothing instead of presenting the PaymentSheet
Its failing silently haha the best one
that presentPaymentSheet() is failing to present the sheet due to some validation internally. Thinking
No worries
I am adding more alerts in places
So i am curious
When should payment intent happen?
When should payment intent happen?
can you explain more? like what do you mean by that
Like what is the flow of the stripe payment process
Should it go
Click thing to buy
Create Payment Intent
InitPaymentSheet
PresentPaymentSheet
respond in a sec
Or does it go
Click thing to buy
Init Payment Sheet
Create Payment Intent
Presnet Payment Sheet
Okay thanks!
the PaymentIntent should be created first, cause initPaymentSheet() takes in a PaymentIntent client_secret
how have you initialized <StripeProvider>?
I wrapped stripe provider around my return in my payment sheet
publishableKey="pk_test_51KTCunGP9q49OSNT5HxReoJeOETWCa27xd3rEkVHRJ1KybVxlO44fW6twhxvfym2AXtKoDcv5APScyOulVJ2d6O100RDKhimdr"
merchantIdentifier='merchant.com.muscovision'
>```
Can I just send you my entire payment sheet code?
yes pls
Are you able to download that second one?
Okay that last one is the right one for sure.
In the render SubscriptionSelect lets user choose the pass they want to purchase - our useEffect at the top listens for PassID and then starts the payment sheet opening process
(Also which is better to use, initStripe or StripeProvider?)
reading through your code and also the SDK code to see if I can trace through what validation code could be causing this silent failing of the sheet to preset()
Thank you so much
I will have to head home in about 10 min, will we be able to reconnect tomorrow again?
yes we can revive the thread tomm! sorry was pulled into a meeting so didn't get a chance to fully dig
what was it??
I think my modals were competing
if your presentingViewController isn't the top most in the nav stack
I would have thought that same issue should have manifested when running outside of Testflight too though
Yayyyyy
but this is that check: https://github.com/stripe/stripe-ios/blob/master/Stripe/PaymentSheet.swift#L92-L99
that should have still returned you a status from your await presentPaymentSheet() though
with status failed