#noor_gpay-react-native

1 messages ยท Page 1 of 1 (latest)

drifting owlBOT
#

๐Ÿ‘‹ 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/1237782762480599091

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

keen lionBOT
#

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.

undone stone
#

hi

#

`// This example sets up an endpoint using the Express framework.
// Watch this video to get started: https://youtu.be/rPR2aJ6XnAc.
const http = require('http')
const express = require('express')
const app = express()
app.use(express.json())
const stripe = require('stripe')('sk_test_51P8pFGJez7Un1YiNlK93NNXYDWfmxQqGEVIXJmYdCO8A0L6PyJaB3DOBnx9efMXL7jSR01vUm5OacVs2pEQphfEA00TDo6huja');

app.post('/paymentsheet', async (req, res) => {
const amount = req.body?.amount
console.log("amount ", amount);
if (!amount || amount <= 0.5) {
return res.status(400).json({ message: "the amount is insufficient :" + amount });
} else if (amount > 10000) {
return res.status(400).json({ message: "Amount must be at most โ‚ฌ10,000.00 EUR"});
}

const customer = await stripe.customers.create();
const ephemeralKey = await stripe.ephemeralKeys.create(
{ customer: customer.id },
{ apiVersion: '2024-04-10' }
);
const paymentIntent = await stripe.paymentIntents.create({
amount: amount*100,
currency: 'eur',
customer: customer.id,
payment_method_types: ['bancontact', 'card', 'ideal', 'klarna', 'sepa_debit'],
});

res.status(200).json({
paymentIntent: paymentIntent.client_secret,
ephemeralKey: ephemeralKey.secret,
customer: customer.id,
publishableKey: 'pk_test_51P8pFGJez7Un1YiNs5HFPM02R2m9AQzqVq5Y0jWyCFqxn56str9fzJ44mJ3gKpScDlViFaxOPSEBGh7RU4VI2arA00Hap7qfJQ'
});
});
const port = process.env.PORT || 3000; // Use environment variable for port or default to 3000
const server = http.createServer(app)
app.listen(port, () => {
console.log(Server listening on port ${port});
});`

glass gorge
drifting owlBOT
#

noor_gpay-react-native

undone stone
#

<application>
...
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
</application>

add this here?

#

?

glass gorge
#

That seems to align with the instructions

undone stone
#

i mean ......
what path file?

glass gorge
#

The manifest file for your app

undone stone
#

this file inside

glass gorge
#

Is that your app?

undone stone
#

yes

glass gorge
#

Then that sounds like the right spot

undone stone
undone stone
glass gorge
#

Yes, it sounds like you're looking at the right manifest file then

undone stone
#

oo ok

#

?

#

.

glass gorge
#

What do you mean do the code here? I'm not terribly familiar with the React Native environment, I'd suggest folloiwng the instructions as written to start.

undone stone
#

ok ok

#

dont close chat

#

stay here for if me need help

#

do you have a person learned React Native?

glass gorge
#

What is the problem you're running into?

undone stone
#

I don't know the file path where the code should be placed

glass gorge
#

The same one we already talked about? Or a different chunk of code?

#

Please do not try to tag our team members directly

undone stone
glass gorge
#

We are not all always available.

undone stone
#

ok

glass gorge
#

So what's the question if we already discussed the answer? Did not work, are you encountering an error of some sort?

undone stone
#

I am facing a problem: what is the file path and how do I write it?

glass gorge
#

You have the file path, we discussed it above. If you're not familiar with making adjustments to your React Native app, you may want to work with a team member who is.

undone stone
#

ok,, transfer me to person learn react native and he knows abou it

glass gorge
#

I have a team member who will come look when they have a minute, but their tied with something else currently.

undone stone
#

ok

#

stay opened chat and say to him back to me

humble grove
#

๐Ÿ‘‹