#teckqueen-react-native

1 messages ยท Page 1 of 1 (latest)

lone wren
lavish fulcrum
#

If there is any other information needed, I am happy to provide. I wasn't sure what was all needed.

lone wren
#

Are you getting any errors when the Payment Sheet tries to pop up?

lavish fulcrum
#

I am not.

#

I have error handling in it and nothing alerts me.

lone wren
#

I'm not the most familiar with test flight, but let me see if there's anyone else who could help

lavish fulcrum
#

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

lone wren
#

my guess would be that it's related to test flight, but i'm not really sure

lavish fulcrum
#

Okay, no worries. Will the next person just pop in this same thread ?

lone wren
#

Yes, someone else would hop in here - no need to create a new thread

lavish fulcrum
#

Okay fantastic. Thank you

lone wren
#

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?

lavish fulcrum
#

Yes

#

pk_test and sk_test - sk_test is saved on our server side

#

And I have pk_test in my app

lone wren
#

and do you mind also sharing a Payment Intent ID that didn't work for you?

lavish fulcrum
#

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

lone wren
#

It's the pi_xxx ID - pi_3KakUCGP9q49OSNT1OXRzstI

lavish fulcrum
#

Okay perfect

jolly spade
#

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.

lavish fulcrum
#

Okay, thank you so much.

scarlet garden
#

@lavish fulcrum hello, pairing with @jolly spade on this, reading up

lavish fulcrum
#

THank you!

scarlet garden
#

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?

lavish fulcrum
#

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?

scarlet garden
#

Do I need a customer ID or ephemeral key?
only if you're initializing PaymentSheet with it! but you said you are not?

#

ah

lavish fulcrum
#

I am trying to open my payment sheet on ios beta build, yes

scarlet garden
#

just to confirm, I think you clarified it earlier to karbi but your Testflight is running on your testmode API keys right?

lavish fulcrum
#

Yes that is correct

#

pk_test

sk_test

#

is there a different mode api keys?

scarlet garden
#

nope API keys are fine. Thinking..

#

can you show me a PaymentIntent ID from simulator, where PaymentSheet does work ?

lavish fulcrum
#

pi_3KanNfGP9q49OSNT0SGwTRjb_secret_9bouGzASpIbFcz58KLYlcxSk1

#

This was one of them

scarlet garden
#

PaymentSheet opens with that PaymentIntent? I assume it confirms as well?

lavish fulcrum
#

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

scarlet garden
#

ah

#

it might be Apple Pay related then... thinking

lavish fulcrum
#

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?

scarlet garden
#

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)

lavish fulcrum
#

Ohhhhh dang

#

yes I am doing both

#

But it still doesnt solve my problem

#

I added in the apple pay after it wouldnt open

#

๐Ÿ˜ฆ

scarlet garden
#

so let's take it step by step

let's remove all STPApplePayContext code

lavish fulcrum
#

Okay

scarlet garden
#

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

lavish fulcrum
#

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

scarlet garden
#

ah gotcha, yeah was just curious how you were testing this since TestFlight takes a bit to get your app on

lavish fulcrum
#

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

scarlet garden
#

ah yeah there's some crazy magic that Metro QR code scanning does, I'm barely versed in it

lavish fulcrum
#

Oh man its brilliant

#

I love it

scarlet garden
#

ok so just to confirm, it isn't working on your iPhone 7 device either right? i.e. PaymentSheet doesn't pop up?

lavish fulcrum
#

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

scarlet garden
#

just the Stripe <> PaymentSheet related RN code

lavish fulcrum
#

That link just takes me a few lines up

#

What thread do you want it on?

scarlet garden
#

can you share code for how you're initializing and presenting PaymentSheet in your app?

lavish fulcrum
#

Yes totally you sent me a link and I dont know where its going

scarlet garden
#

it was a link to a msg I sent earlier in this thread

lavish fulcrum
#

ohhhh hahaha

#

Is there like a code snippet function in here?

scarlet garden
#

you can put three back ticks `

like

test()
lavish fulcrum
#

I dont get it

#

Its saying its too big

scarlet garden
#

can you share just the initPaymentSheet() function

lavish fulcrum
#

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?

scarlet garden
lavish fulcrum
#

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

scarlet garden
#

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,
                })
lavish fulcrum
#

I cannot run test flight

#

But I can do expo build

scarlet garden
#

who is running your TestFlight build then? like the one where PaymentSheet is not working?

lavish fulcrum
#

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?

scarlet garden
#

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

lavish fulcrum
#

Okay perfect.

#

Is it okay if I message you back in the morning? I have to take off here for an appointment soon.

scarlet garden
#

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/

lavish fulcrum
#

Okay fantastic

frail lava
#

Hello. Re-opened this

lavish fulcrum
#

Whoops! Sorry hello ๐Ÿ™‚

#

I didnt see you message me

scarlet garden
#

hello! welcome back!

#

do you have updates from yesterday?

lavish fulcrum
#

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 '

scarlet garden
#

ah great, thank you

lavish fulcrum
#

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

scarlet garden
#

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

lavish fulcrum
#

Right, I understand.

lavish fulcrum
#

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

lavish fulcrum
#

Hello

#

Is discord back up and running?

lone wren
#

It's slowly coming back up, but responses might be slow since they're still working on restoring full service

lavish fulcrum
#

Okay

#

No worries I will check back in a little bit then

scarlet garden
#

@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

lavish fulcrum
#

I did and I get no alert

#

Logging the alert view immediately before

scarlet garden
#

ack

#

so it most likely is case 2

lavish fulcrum
#

Its failing silently haha the best one

scarlet garden
#

that presentPaymentSheet() is failing to present the sheet due to some validation internally. Thinking

lavish fulcrum
#

No worries

#

I am adding more alerts in places

#

So i am curious

#

When should payment intent happen?

scarlet garden
#

When should payment intent happen?
can you explain more? like what do you mean by that

lavish fulcrum
#

Like what is the flow of the stripe payment process

Should it go
Click thing to buy
Create Payment Intent
InitPaymentSheet
PresentPaymentSheet

scarlet garden
#

respond in a sec

lavish fulcrum
#

Or does it go

Click thing to buy
Init Payment Sheet
Create Payment Intent
Presnet Payment Sheet

#

Okay thanks!

scarlet garden
#

the PaymentIntent should be created first, cause initPaymentSheet() takes in a PaymentIntent client_secret

lavish fulcrum
#

ok thank you

#

Do you have any other ideas why it would not call?

scarlet garden
#

how have you initialized <StripeProvider>?

lavish fulcrum
#

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?

scarlet garden
#

yes pls

lavish fulcrum
#

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?)

scarlet garden
#

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()

lavish fulcrum
#

Thank you so much

lavish fulcrum
#

I will have to head home in about 10 min, will we be able to reconnect tomorrow again?

scarlet garden
#

yes we can revive the thread tomm! sorry was pulled into a meeting so didn't get a chance to fully dig

lavish fulcrum
#

That's okay.

#

I actually figured out my problem.

scarlet garden
#

what was it??

lavish fulcrum
#

I think my modals were competing

scarlet garden
#

ah

#

yeah that would be it

lavish fulcrum
#

I had a modal pop up for loading

#

and they competing

scarlet garden
#

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

lavish fulcrum
#

Yayyyyy

scarlet garden
#

with status failed

lavish fulcrum
#

I did get a status failed but no error message.. ahhh

#

๐Ÿ™‚

#

Hooray!

scarlet garden
#

I did get a status failed but no error message
ah I didn't realize that

#

but glad you're unblocked!