#fiyaz-question

1 messages · Page 1 of 1 (latest)

tawdry fiber
#

Hey @ebon dune! Best to just ask your question here

ebon dune
#

@tawdry fiber thanks for responding to me. Actually I have a detailed chat in this thread and otherwise I have to share all details again.

tawdry fiber
#

Unfortunately, you'll need to share the details. Wherever we left the chat, it should be fairly straightforward to summarize your exact latest question

#

I read your other thread there's almost nothing in it that is important other than you use React Native, have an issue with Apple Pay and would ask your client to load a specific url and that's it

ebon dune
#

@tawdry fiber yes I asked only that the same guy will reply and he have an idea about it. anyway can you help me about this issue or should I ask to someone else

tawdry fiber
#

I can help yes, do you have the info?

ebon dune
#

yes I asked my client to open the link and share the video. yes I can confirm that the apple pay button us there in the page.

tawdry fiber
#

Please use this thread for discussion and shared the picture/video here

ebon dune
#

@tawdry fiber sorry i accidentally share the pic outside this thread. Now you can see it here

tawdry fiber
#

that's just a picture of a video, but yes I see they have the correct Apple Pay button showing in that case

ebon dune
#

yes i have taken screenshot from her video

#

but in our app it is SDK is indicating that device is not supported

#

yes i took a screenshot of her video

tawdry fiber
#

Can you share your exact code for that part of your app please?

ebon dune
#

do you want me to show the client side code or server side code

tawdry fiber
#

The client-side code

ebon dune
#

ok just give me a minute please

#

export const applePay = async (
isApplePaySupported,
presentApplePay,
amount,
confirmApplePayPayment,
description,
receipt_email,
name,
uid,
type,
plan,
setLoader,
navigation,
fromProfile,
) => {
// if (!isApplePaySupported) return
console.log(1)
const { error } = await presentApplePay({
cartItems: [{ label: planType, amount: ${amount} }],
shippingMethods: [
{
amount: amount * 100,
identifier: 'GEMS',
label: 'Subscription',
detail: 'Subscribe',
type: 'final',
},
],
country: 'US',
currency: 'usd',
requiredShippingAddressFields: ['emailAddress', 'phoneNumber'],
requiredBillingContactFields: ['phoneNumber', 'name'],
})
console.log(2)

if (error) {
console.log(error)
Alert.alert(error.code, error.message)
return
}

const { paymentIntent } = await fetchPaymentSheetParams(
amount,
description,
receipt_email,
name,
uid,
type,
plan,
setLoader,
)

const { error: confirmError } = await confirmApplePayPayment(
paymentIntent.client_secret,
)

if (confirmError) {
Alert.alert(confirmError.code, confirmError.message)
return
}
Toast.show({
type: 'success',
text1: 'Success',
text2: 'The payment was confirmed successfully.',
})
if (fromProfile) {
navigation.goBack()
} else {
navigation.replace('SelectUser')
}
}

#

i have this below check to verify the device support and it show the toast for not supporting

#

const checkApplePay = () => {
if (!isApplePaySupported) {
Toast.show({
type: 'info',
text1: 'Apple Pay',
text2: 'Please check you have a card added to wallet',
})
}
}

tawdry fiber
ebon dune
#

This is how I have used StripeProvider
<StripeProvider
publishableKey={STRIPE_PUBLISH_KEY}
merchantIdentifier={MERCHANTID}
>

sacred sail
#

I'm a bit confused, are you mounting a <ApplePayButton> in your component?
I didn't see that in your code

#

I just see you checking "if Apple Pay is supported on device" and then immediately calling presentApplePay() which presents the sheet

#

just taking step by step to rule out what the issue is, so might ask you to take a step back and work piece by piece to rule out what could be the problem

ebon dune
#

No i am not using apple button. I have a custom button for Google pay and apple pay. Google pay is working but apple pay is not. I am calling thus function at apple pay custom button

#

Actually forget the above code and keep in mind that below code for checking support. I am calling thus function when I render the screen. so it immediately tells the user either the device supports or not. it always showing me that device is not supported

#

is there any way that we can have a zoom meeting and you then guide me for first 4 steps. I've verified it by myself many times but I'm the error can be due to those 4 steps.

sacred sail
#

yeah I understood that part but I'm confused as to where what is in your component.

e.g. where is checkApplePay() being called on your component? I just see the function, not where it is called.

let's simplify this all, just comment out everything on your component and simplify it to (this is psuedocode here)

1/ just an

if (isApplePaySupported) {
  console.log("Apple Pay is supported!")
}
else {
  console.log("Not supported")
}
#

4/ who owns the Apple Developer Account where you registered the Apple Pay certificate and merchant ID? You or your client in the US?

#

5/ how are you locally testing? AFAIK you should be able to see simulated Apple Pay cards in an iOS simulator, though I don't know if that depends on whether the Apple Developer Account is from an Apple Pay supported region or not

ebon dune
#

for step 1 I'm calling this function in useEffect. when the screen gets render.

#

for step 2 I'm not sure how to do partly redacted

tawdry fiber
#

just DM me, I'll share with hmunoz, we both work for Stripe

ebon dune
#

Should I send the complete merchant ID. is there will not be any security issue??

tawdry fiber
ebon dune
#

I am reaching them out for last 14 days. They are replying to me that technical team is working but I don't think so because technical team not asked even a single question from me about issue till today. Actually you guys have asked more questions from me about the issue than them.

#

I can share it to you guys if I can change keys later and there will be no security issue

tawdry fiber
#

We're helping but you're worried about sharing personal info, which is a good thing to think of. But we can't help you further without that info

#

we do not want API keys. Please never ever share API keys

ebon dune
#

yes. Actually it's my 8th project with stripe payments and I am very familiar with it. but now i am struggling with it and the technical team not even helped me💔

tawdry fiber
#

let's ignore this, we're literally 2 engineers helping you right here

ebon dune
#

so I can share the merchant ID to you and after resolving the issue I will generate the certificate again

tawdry fiber
#

merchant ids is not really sensitive, there's no reason to generate a new cert unless you leak the cert

#

What you need to decide is whether you are comfortable sharing the info we asked in private with me or not. If not (which is fine) you have to talk to our support team

ebon dune
#

yes I am thankful to both of you. I acknowledge that stripe provide support but for now I'm struggling

#

actually the I have to select the first path. because second I've tried the second option from last 14 days

tawdry fiber
#

Please just focus on what we ask

#

Let's ignore what's hard, support quality and all that

ebon dune
#

can you please check your inbox sir

#

for 4. Apple developer account owner is my client. she is from USA

#
  1. I made a TestFlight and send to her and she tested it on her devices
sacred sail
#

for 5/, I believe you should be able to test your app locally and it should show you the Apple Pay button. Can you give that a shot for me?

#

and can you make the changes I recommended in 1/, just to simplify your code to just the isApplePaySupported and either doing a console.log() or throwing up a Toast

ebon dune
#

I'm in Pakistan. will it show me the button?

sacred sail
#

I don't know, which is why I'm asking to try.

ebon dune
#

const checkApplePay = () => {
if (!isApplePaySupported) {
Toast.show({
type: 'info',
text1: 'Apple Pay',
text2: 'Please check you have a card added to wallet',
})
}
}

sacred sail
#

can you change your code to throw a Toast when isApplePaySupported is true

#

so a Toast in both cases, the if and the else

ebon dune
#

Oh my bad. actually for that I've to share this tomorrow. because I'm at my home and laptop is in my office. it's 10:18 PM here💔

sacred sail
#

no problem, you can share tomorrow.

ebon dune
#

so i will create a new thread??

sacred sail
ebon dune
#

can i mention bot of you in my tomorrow's message so then you can take this thread further?

sacred sail
#

just ask in #dev-help and whoever is around will help you

ebon dune
#

ok I've copied this link and thanks to both of you

sacred sail
#

no problem!

ebon dune
#

have a good day sir

sacred sail
#

you too

light knot
#

👋 @ebon dune

ebon dune
#

@tawdry fiber @sacred sail I'm back please reopen this when you are available

#

@light knot Will you assist me now?

light knot
#

Sure! It's a long thread and I need some times to catch up. But what's your issue?

ebon dune
#

I have a apple pay issue. Please take a look and let me know if we can continue it or I've to wait it for them/

light knot
#

Can you summarize your current state?

ebon dune
#

Actually They asked me to do 5 steps. Below is the first step
if (isApplePaySupported) {
console.log("Apple Pay is supported!")
}
else {
console.log("Not supported")
}

#

in console I can see it is showing Not supported.

#

for step 2 and 3 I've shared these with koopajah in DM

#

for 4. Apple developer account owner is my client. she is from USA

#

for 5 I have tested it in debug mode at my device but can understand that may be I'm in Pakistan that's why it is showing not supported. I also have send the testFlight to client but still the same

#

This is all for now

#

Are we still connected?

light knot
#

Yes, I am looking at the thread

ebon dune
#

Ok sir.

light knot
#

Can I ask again for your account id? acct_xxx It's safe to share here

ebon dune
#

I've shared customer id in test mode with. Will it work for you if I share the same with you in DM?

light knot
#

I don't have DM, I am afraid. It's ok if you are not comfortable sharing it here

#

Okie I found our conversation. Everything looks good.

#

qq, did you setup your merchantIdentifier correctly inside StripeProvider?

ebon dune
#

If it is safe then I can share it here

#

I'm doing like this
<StripeProvider
publishableKey={STRIPE_PUBLISH_KEY}
merchantIdentifier={MERCHANTID}
>

light knot
#

Yes, does this {MERCHANTID} match the "Merchant IDs" that is ticked on Xcode?

ebon dune
#

Yes both are same

#

Do you need account ID?

light knot
#

If you can share here for double check it would help

ebon dune
#

If you have noted it then I can delete it?

light knot
#

Sure go ahead

ebon dune
#

Ok thanks

light knot
#

You don't need to IMO but it's up to you

ebon dune
#

sorry I didn't get IMO?

light knot
#

in my opinion. No worry.

#

At this moment I think everything seems to setup correctly

#

Have you tried with a real iPhone which has wallet setup properly?

ebon dune
#

Yes I have sent the testFlight to my client and she has tested it on real devices. Not even on a single device

light knot
#

I see.

#

Do you have access to the Apple Developer Account?

#

I want to double check smth there

ebon dune
#

yes please give me a while

#

Yes what you want me to check here sir

#

I've opened

#

She has added me to her account

light knot
#

On your merchant id, do you see exactly "Apple Pay Payment Processing Certificate"?

ebon dune
#

so I legged In by my account and select her account from menu

light knot
#

Yes, can you open your Merchant Id page?

ebon dune
#

yes i have opened

light knot
#

Do you see the section "Apple Pay Payment Processing Certificate"?

#

Smth like this. This is my account

ebon dune
#

yes

light knot
#

Do you see the Expires date matching what you see in Stripe Account? and it says "Active Certificate" as my screenshot?

ebon dune
#

Certificate is active but how can I match this date with stripe account?

light knot
ebon dune
#

But I have a warning on this page for terms and conditions. Let me send you the picture

light knot
#

Yes it's pretty much it

#

Let's ask your client to take care of that warning

#

Basically she can just visit the link and click on "Accept". Since she is the account owner, she is the one to do that

ebon dune
#

How can she accept.? I clicked on this link and there is no option for accepting

light knot
#

It may depends on the Account type. May be she is Account Holder and you are a developer/member was added to the account. Only Account Holder would be able to action

ebon dune
#

Ok is this the issue or we need to check anything else.

light knot
#

Let's start with this and come back if you are still facing issue

ebon dune
#

Actually she is from USA. so I can have her on meeting almost after 6 hours.

light knot
#

You can come here after that. We are happy to continue to help

ebon dune
#

Do I need to ask you to reopen this with same link which I asked earlier today?

#

Can you please send me the link which I need to ask for reopening the thread

light knot
#

It's the same link, to this thread

#

You can just ask again in the channel. Any of us who is online should be able to reopen the thread

ebon dune
#

Ok sir thank you so much for your kind help. Have a nice day!

light knot
#

Good luck!

ebon dune
#

Have a wonderful day

ancient surge
#

Hi @ebon dune how can I help?

ebon dune
#

I have an issue regarding apple pay. Can you have a look at my chat with your team?

ancient surge
#

It's a long chat, do you mind to give me a quick summary?

ebon dune
#

Actually react native stripe SDK is returning apple pay not for all devices although they support. They checked my configuration. everything is set up fine. At the end they asked me to tell my client to accept terms and conditions by apple. You can see the pic from last 10 messages. She did this but still the same issue.

ancient surge
ebon dune
#

isApplePaySupported or isApplePaySupported()?

#

Ohhh my bad. I'm using isApplePaySupported and not isApplePaySupported()

ancient surge
#

it's isApplePaySupported(), it will return a promise, so you want to use await .

ebon dune
#

const { isApplePaySupported, presentApplePay, confirmApplePayPayment } =
useApplePay()

#

I'm getting it from useApplePay hook. is it a function?

ancient surge
#

Yes, it's a function.

ebon dune
#

Let me check!

ancient surge
#

Hmm, sorry it's a boolean

ebon dune
#

check this, here they are not using it like function

#

Yes

ancient surge
#

so is isApplePaySupported always false in your application?

ebon dune
#

yes

#

const checkApplePay = () => {
if (isApplePaySupported) {
console.log('Apple Pay is supported!')
} else {
Toast.show({
type: 'info',
text1: 'Apple Pay',
text2: 'Apple pay is not supported',
})
}
}

#

it always show a toast

ancient surge
#

Have you setup the apple pay in the test device? i.e., add a valid card to the wallet?

ebon dune
#

Yes everything is setup. Even used these devices for apple pay in other websites.

ancient surge
#

Can you send me one of the PaymentIntent ID?

ebon dune
#

for apple pay or any other payments like google pay and cards?

#

Are we still connected?

ancient surge
#

One of the apple pay PaymentIntent IDs

ebon dune
#

I have no PaymentIntent ID becuase it is always returning false and not opening the payment card by using presentApplePay

#

But I do have for cards and google pay

ancient surge
#

Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings ->Account Details

ebon dune
#

Ok wait

#

are you talking about account_id?

#

like acct_xxxxxxxx

#

Are you there?

ancient surge
#

Yes the account ID starts with acct_

ebon dune
#

Should I share here publicly or DM to you

ancient surge
#

It's up to you, you can DM me if you find it more comfortable

ebon dune
#

Please check inbox

#

I've sent it you.

#

Sir are we still connected?

ancient surge
#

Yes, the discord is busy today, please expect a delayed response.

ebon dune
#

Ok sure. No problem

ancient surge
#

Just want to confirm, are you testing Apple Pay outside US?

ebon dune
#

no

#

I'm from Pakistan but my client is from US. so I made test flight and she tested in the US

#

It's almost a month now and I'm still looking for the solution.

ancient surge
#

Have you solved the merchant ID warning as my colleague suggested previously?

ebon dune
#

Yes she has accepted the terms and there is no warning now

ancient surge
ebon dune
#

from where I need to download the certificate again?

ancient surge
ebon dune
#

Ok I'll check and let you guys know.