Back

[CLOSED] cloud functions for instamojo integration l

  • 1
  • Functions
  • Web
bharath
23 May, 2023, 02:29

Hey can anyone help me how to integrate instamojo payment gateway by using appwrite cloud functions

TL;DR
User is seeking help to integrate Instamojo payment gateway using Appwrite cloud functions. They have watched a tutorial video but need guidance on implementing it in their project. Another user suggests creating a cloud function in Appwrite using Node.js. The function should include a route variable to handle different parts of the integration process. The user asks for assistance in their repository, and the second user shares documentation and a Discord thread for further information. The tutorial video does not provide the code for free, which makes it difficult for the user, but they are willing to share the code with the second user.
bharath
23 May, 2023, 02:29

@Binyamin can you help me

Binyamin
23 May, 2023, 12:42

Hey @bharath

Binyamin
23 May, 2023, 12:42

What part you're now in the integration process

bharath
23 May, 2023, 12:42

Not yet started

bharath
23 May, 2023, 12:43

Thanks @Binyamin because of you I have completed most of my project

bharath
23 May, 2023, 12:43

Now iam stucked at payment gateway integration

bharath
23 May, 2023, 12:44
bharath
23 May, 2023, 12:44

I need to integrate instamojo payment gateway in my website

bharath
23 May, 2023, 12:45

As you know my frontend is reactjs and backend is appwrite appwrite

bharath
23 May, 2023, 12:48

I tried with this video

bharath
23 May, 2023, 12:51

@Binyamin are you there

Binyamin
23 May, 2023, 12:51

Yes, I've watched the video

Binyamin
23 May, 2023, 12:52

It seems like pretty straightforward

bharath
23 May, 2023, 12:52

Now how do I implement in my project

Binyamin
23 May, 2023, 12:56

You'll need to create an Appwrite cloud function, a node one. Then you can spoof the part in which the video set to routes by setting some variable. For example: In your react you can send the route and the info in the function data

TypeScript
const res = await function.execute('instamojoFunctionID', JSON.stringify({route:'start',info: {
  name,
  email
}}));

Then, in your function you can

TypeScript
 const functionData = JSON.parse( req.variables.APPWRITE_FUNCTION_DATA ?? '{}') ?? {};

if(functionData.route === 'start'){

} else if(functionData.route === 'charge'){

}

And the rest is like in the video

bharath
23 May, 2023, 13:03

???

bharath
23 May, 2023, 13:03

Can you do this in my repo

bharath
23 May, 2023, 13:11

@Binyamin I don't know much about cloud functions please could do in my repo

bharath
23 May, 2023, 13:12

I will dm my repo

Binyamin
23 May, 2023, 13:14

You can see here a quick overview of how to create functions https://appwrite.io/docs/functions

And also in this thread: https://discord.com/channels/564160730845151244/1110177763450691586/1110191016553750608

Binyamin
23 May, 2023, 13:15

The video of the tutorial won't give the code for free

Binyamin
23 May, 2023, 13:15

As of that it will be difficult for me just to type all of it

bharath
23 May, 2023, 13:16

I typed all that code

bharath
23 May, 2023, 13:16

I will share you

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more