#ludongming_code

1 messages · Page 1 of 1 (latest)

manic kernelBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1315847351256092692

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

celest magnet
#

Hi, buddy

undone kelp
#

Have you tried the suggestion from my colleague @.os4m37 to run react-native example code from Stripe?

celest magnet
#

{"code": "Failed", "declineCode": null, "localizedMessage": "There was an unexpected error -- try again in a few seconds", "message": "No such setupintent: 'seti_1QUIGgHiYvn8ZIkeF7X7HNQL'", "stripeErrorCode": "resource_missing", "type": "invalid_request_error"}

#

Your demo API no longer has a 404

undone kelp
#

Sorry, I don’t get your question. Could you explain what problem you’re facing with the example code?

celest magnet
#

No value was returned here

#

Our server-side generates an error message when calling up the payment pop-up with the setup intent, but there is no such setup intent
{"code": "Failed", "declineCode": null, "localizedMessage": "There was an unexpected error -- try again in a few seconds", "message": "No such setupintent: 'seti_1QUIGgHiYvn8ZIkeF7X7HNQL'", "stripeErrorCode": "resource_missing", "type": "invalid_request_error"}

#

initPaymentSheet({
customerId: 'cus_RMnoEyyQI5icD5',
setupIntentClientSecret: 'seti_1QUIGgHiYvn8ZIkeF7X7HNQL_secret_RN2LrbW95Y6ODLJIUkD9YeBwNSSPZb8',
customerEphemeralKeySecret: 'ek_test_YWNjdF8xT2J3bzJIaVl2bjhaSWtlLHlZZXlsUmVmYVhRZXR4RG13WDB0ZzRKcGNoZmlDV3U_00MTjd6Jof',
merchantDisplayName: 'Example Inc.',
applePay: {
merchantCountryCode: 'US',
cartItems: [
{
paymentType: 'Recurring',
label: 'This is a subscription',
amount: '10.00',
intervalCount: 1,
intervalUnit: 'month',
startDate: startDate,
endDate: endDate,
},
],
},
style: 'automatic',
googlePay: {
merchantCountryCode: 'US',
testEnv: true,
},
returnURL: 'stripe-example://stripe-redirect',
allowsDelayedPaymentMethods: true,
})

undone kelp
#

This doesn't look like our example code. Could you try our example code as it is?

celest magnet
#

My screenshot is your demo

#

Can you understand what I mean? In your example, when it comes to remotely obtaining payment parameters, the interface reported an error

undone kelp
#

What I mean is that you should run the entire project from the code example, not copy and paste the code to your own project

#

With reference to your first screenshot, it looks like you're running from own project directory

#

I might be wrong, are you trying the example code as it is?

celest magnet
#

Responsive.json serialization failed

undone kelp
#

Is the issue with seralization or seti_1QUIGgHiYvn8ZIkeF7X7HNQL not found?

#

The information you shared are mixed that I can't pinpoint which is the issue you're facing

celest magnet
#

Because your interface reported an error, we went to our own server to generate the setup intent, but it would report an error stating that the setup intent does not exist

undone kelp
#

Thanks for sharing. This explains the errors you shared. I'd recommend sharing the what you've done and their relationships, so that we can understand your issues better.

#

Has the glitch server responded the necessary information correctly?

celest magnet
#

{"_h": 0, "_i": 0, "_j": null, "_k": null} {"_bodyBlob": {"_data": {"__collector": [Object], "blobId": "b273d626-2901-4ed0-a029-ac531e13c177", "offset": 0, "size": 166}}, "_bodyInit": {"_data": {"__collector": [Object], "blobId": "b273d626-2901-4ed0-a029-ac531e13c177", "offset": 0, "size": 166}}, "bodyUsed": true, "headers": {"map": {"content-length": "166", "content-security-policy": "default-src 'none'", "content-type": "text/html; charset=utf-8", "date": "Tue, 10 Dec 2024 02:44:46 GMT", "x-content-type-options": "nosniff", "x-powered-by": "Express"}}, "ok": false, "status": 404, "statusText": "", "type": "default", "url": "https://rigorous-heartbreaking-cephalopod.glitch.me/payment-sheet-subscription"}

undone kelp
celest magnet
#

So does your URL have a new one

#

So I also need to start a service?

#

Don't you have this interface online now?

undone kelp
#

The glitch is out of sync from the example code, that's why 404 error is thrown

#

I'm sorry for that and I'll share the feedback to the relevant team to fix this

celest magnet
#

Are you saying I raised an issue on GitHub?

undone kelp
#

I have reported internally to fix the issue, but the fix won't be immediate

#

Meanwhile, you can clone and glitch and implement the missing endpoint

celest magnet
#

So, where should I create a work order and upload my code

undone kelp
#
GitHub

React Native library for Stripe. Contribute to stripe/stripe-react-native development by creating an account on GitHub.

GitHub

React Native library for Stripe. Contribute to stripe/stripe-react-native development by creating an account on GitHub.

#

This will create a new server using glitch

celest magnet
#

Can I request a work order regarding my original question?

undone kelp
#

We are unable to reproduce the issue you described in your original question, i.e. Google Pay isn't shown in the Payment Sheet. We are unable to identify whether it's a device, code or your project configuration issue since we can't reproduce with your initPaymentSheet config.

That's the reason why we suggest to use stripe code example as it is (running directly from code example instead of copying to your own project) to test out to eliminate environment configuration.

Another few items we can test here are:

  • Does your Payment Sheet configuration work in other android device?
  • Have you tried in the Pixel 3 Android simulator? Google Pay only works on Pixel 3 simulator

If it still doesn't work, I'm afraid we need to check with the relevant team to look into it further.