#fiyaz-question
1 messages · Page 1 of 1 (latest)
@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.
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
@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
I can help yes, do you have the info?
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.
Please use this thread for discussion and shared the picture/video here
@tawdry fiber sorry i accidentally share the pic outside this thread. Now you can see it here
that's just a picture of a video, but yes I see they have the correct Apple Pay button showing in that case
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
Can you share your exact code for that part of your app please?
do you want me to show the client side code or server side code
The client-side code
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',
})
}
}
Can you confirm what you did for step 1 through 4 exactly https://stripe.com/docs/apple-pay?platform=react-native#merchantid
1/ How did you initialize StripeProvider and what did you pass in merchantIdentifier exactly
2/ How do you display ApplePay (or are you using PaymentSheet)?
This is how I have used StripeProvider
<StripeProvider
publishableKey={STRIPE_PUBLISH_KEY}
merchantIdentifier={MERCHANTID}
>
no I am not using paymentSheet. I'm using apple pay by following this link https://stripe.com/docs/apple-pay?platform=react-native
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
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.
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")
}
we can figure this out without zoom call, let's do the above first
2/ can you share your merchant ID (partly redacted) that you're passing to <StripeProvider> ?
3/ can you share a (partly redacted) screenshot of what your XCode section here looks like: https://stripe.com/docs/apple-pay?platform=react-native#xcode-pay
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
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
just DM me, I'll share with hmunoz, we both work for Stripe
Should I send the complete merchant ID. is there will not be any security issue??
up to you. You can work with our support team directly if you prefer: https://support.stripe.com/contact
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
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
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💔
let's ignore this, we're literally 2 engineers helping you right here
so I can share the merchant ID to you and after resolving the issue I will generate the certificate again
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
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
Please just focus on what we ask
Let's ignore what's hard, support quality and all that
can you please check your inbox sir
for 4. Apple developer account owner is my client. she is from USA
- I made a TestFlight and send to her and she tested it on her devices
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
I'm in Pakistan. will it show me the button?
I don't know, which is why I'm asking to try.
const checkApplePay = () => {
if (!isApplePaySupported) {
Toast.show({
type: 'info',
text1: 'Apple Pay',
text2: 'Please check you have a card added to wallet',
})
}
}
can you change your code to throw a Toast when isApplePaySupported is true
so a Toast in both cases, the if and the else
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💔
no problem, you can share tomorrow.
so i will create a new thread??
we'll most likely reopen this thread for you, just message in #dev-help with the link to this thread -> #1014203195490304020 message
can i mention bot of you in my tomorrow's message so then you can take this thread further?
ok I've copied this link and thanks to both of you
no problem!
have a good day sir
you too
👋 @ebon dune
@tawdry fiber @sacred sail I'm back please reopen this when you are available
@light knot Will you assist me now?
Sure! It's a long thread and I need some times to catch up. But what's your issue?
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/
Can you summarize your current state?
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?
Yes, I am looking at the thread
Ok sir.
Can I ask again for your account id? acct_xxx It's safe to share here
I've shared customer id in test mode with. Will it work for you if I share the same with you in DM?
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?
If it is safe then I can share it here
I'm doing like this
<StripeProvider
publishableKey={STRIPE_PUBLISH_KEY}
merchantIdentifier={MERCHANTID}
>
Yes, does this {MERCHANTID} match the "Merchant IDs" that is ticked on Xcode?
If you can share here for double check it would help
If you have noted it then I can delete it?
Sure go ahead
Ok thanks
You don't need to IMO but it's up to you
sorry I didn't get IMO?
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?
Yes I have sent the testFlight to my client and she has tested it on real devices. Not even on a single device
I sent this link to her just for the sake of confirmation and she confirmed that their is apple pay button showing in this page
https://stripe.com/docs/stripe-js/elements/payment-request-button
I see.
Do you have access to the Apple Developer Account?
I want to double check smth there
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
On your merchant id, do you see exactly "Apple Pay Payment Processing Certificate"?
so I legged In by my account and select her account from menu
Yes, can you open your Merchant Id page?
yes i have opened
Do you see the section "Apple Pay Payment Processing Certificate"?
Smth like this. This is my account
yes
Do you see the Expires date matching what you see in Stripe Account? and it says "Active Certificate" as my screenshot?
Certificate is active but how can I match this date with stripe account?
https://dashboard.stripe.com/settings/payments/apple_pay if you have access to Stripe Dashboard
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
But I have a warning on this page for terms and conditions. Let me send you the picture
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
How can she accept.? I clicked on this link and there is no option for accepting
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
Ok is this the issue or we need to check anything else.
Let's start with this and come back if you are still facing issue
Actually she is from USA. so I can have her on meeting almost after 6 hours.
You can come here after that. We are happy to continue to help
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
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
Ok sir thank you so much for your kind help. Have a nice day!
Good luck!
Have a wonderful day
Hi @ebon dune how can I help?
I have an issue regarding apple pay. Can you have a look at my chat with your team?
It's a long chat, do you mind to give me a quick summary?
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.
I'm checking your code, is the value of isApplePaySupported variable set by the resolved promise of isApplePaySupported() function https://stripe.dev/stripe-react-native/api-reference/index.html#isApplePaySupported ?
Documentation for @stripe/stripe-react-native
isApplePaySupported or isApplePaySupported()?
Ohhh my bad. I'm using isApplePaySupported and not isApplePaySupported()
it's isApplePaySupported(), it will return a promise, so you want to use await .
const { isApplePaySupported, presentApplePay, confirmApplePayPayment } =
useApplePay()
I'm getting it from useApplePay hook. is it a function?
Yes, it's a function.
Let me check!
Hmm, sorry it's a boolean
so is isApplePaySupported always false in your application?
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
Have you setup the apple pay in the test device? i.e., add a valid card to the wallet?
Yes everything is setup. Even used these devices for apple pay in other websites.
Can you send me one of the PaymentIntent ID?
for apple pay or any other payments like google pay and cards?
Are we still connected?
One of the apple pay PaymentIntent IDs
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
Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings ->Account Details
Yes the account ID starts with acct_
Should I share here publicly or DM to you
It's up to you, you can DM me if you find it more comfortable
Yes, the discord is busy today, please expect a delayed response.
Ok sure. No problem
Just want to confirm, are you testing Apple Pay outside US?
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.
Have you solved the merchant ID warning as my colleague suggested previously?
Yes she has accepted the terms and there is no warning now
OK, can you try download the latest certificate and upload it to Dashboard https://dashboard.stripe.com/settings/payments/apple_pay ?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
from where I need to download the certificate again?
https://stripe.com/docs/apple-pay?platform=react-native I'm not a iOS developer but I think this is something you should get from Apple.
Ok I'll check and let you guys know.