Paytm integration with flutter

Overview

pe_paytm

A new Flutter package project is created by Harsh Tyagi ([email protected]) and Harsh Agrawal([email protected]).

#For Demo Demo

Getting Started

Follow the following Steps to integrate the paytm payment in Flutter Application.

  1. Go to Firebase console and Create a Firebase Project (e.g. payments Testing).

  2. Set up Node.js and the Firebase CLI

    You'll need a Node.js environment to write functions, and you'll need the Firebase CLI to deploy functions to the Cloud Functions runtime. Node.js versions 8 and 10 are supported. For installing Node.js and npm, Node Version Manager is recommended.

    Once you have Node.js and npm installed, install the Firebase CLI via your preferred method. To install the CLI via npm, use:

    npm install -g firebase-tools

  3. Initialize Firebase SDK for Cloud Functions

    When you initialize Firebase SDK for Cloud Functions, you create an empty project containing dependencies and some minimal sample code, and you choose either TypeScript or JavaScript for composing functions.

     To initialize your project:
    
     Run firebase login to log in via the browser and authenticate the firebase tool.
     Go to your Firebase project directory.
     Run firebase init functions. The tool gives you an option to install dependencies with npm. It is safe to decline if you want to manage dependencies in another way.
     The tool gives you two options for language support:
    
     JavaScript
     TypeScript.
     For this tutorial, select JavaScript.
    
     After these commands complete successfully, your project structure looks like this:
    
     myproject
     +- .firebaserc    # Hidden file that helps you quickly switch between
     |                 # projects with `firebase use`
     |
     +- firebase.json  # Describes properties for your project
     |
     +- functions/     # Directory containing all your functions code
         |
         +- .eslintrc.json  # Optional file containing rules for JavaScript linting.
         |
         +- package.json  # npm package file describing your Cloud Functions code
         |
         +- index.js      # main source file for your Cloud Functions code
         |
         +- node_modules/ # directory where your dependencies (declared in
                         # package.json) are installed
    

    For more details regarding firebase functions go to https://firebase.google.com/docs/functions/get-started

  4. Install some node packages by running this command in your project folder:

    npm install express body-parser

  5. Clone the some necessary file from this repository: https://github.com/harshtyagimdr/pe_paytm_requirements/

    Put these file in your functions Folder and replace your credentials and CallbackURL.

  6. Deploy your function by running the command :

    firebase deploy --only functions

In flutter code, You have to change something as shown below:

Example :

 onPressed: () async {
          PePaytm pePaytm = new PePaytm(
              paymentURL:
                  'https://us-central1-payments-testing-5fc15.cloudfunctions.net/customFunctions/payment');

          await pePaytm.makePayment(context,
              order: Order(
                  orderId: DateTime.now().millisecondsSinceEpoch.toString(),
                  phoneNumber: '7777777777',
                  amount: '100',
                  custId: 'CUST123456',
                  email: '[email protected]'));
                 // TODO send your data for payment
        },
You might also like...

Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.

Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.

Flutter Music Player First Open Source Flutter based Beautiful Material Design Music Player(Online Radio will be added soon.) Demo App Play Store BETA

Jan 8, 2023

a project for learning all Flutter Widgets , sync from flutter.dev the officia website.

Flutter Widgets Catalog (WIP) 计划 1、使用Flutter开发一个全平台的Flutter Widgets Catalog APP,并且开源。在这个APP中可以通过图形化的方式查看所有Widgets的介绍,示例,视频教程。 2、所有文档内容由前一天从flutter.dev

Aug 3, 2022

A low-cost Flutter screen adaptation solution(一个极低成本的 Flutter 屏幕适配方案)

A low-cost Flutter screen adaptation solution(一个极低成本的 Flutter 屏幕适配方案)

A low-cost Flutter screen adaptation solution(一个极低成本的 Flutter 屏幕适配方案) 100% 还原 UI,只需要按照设计图写的宽高写即可 先看图片,设置的标准宽度是 360 iPhone 8 --------------------------

Sep 27, 2022

Flutter 2.0 (Null safety) Basic, Dynamic & Silver style Staggered Grid views made using flutter staggered grid view package. 🦺

Flutter 2.0 (Null safety) Basic, Dynamic & Silver style Staggered Grid views made using flutter staggered grid view package. 🦺

Staggered Grid View Developement Stack Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Oct 28, 2022

A Flutter package that makes it easy to customize and work with your Flutter desktop app's system tray.

A Flutter package that makes it easy to customize and work with your Flutter desktop app's system tray.

system_tray A Flutter package that that enables support for system tray menu for desktop flutter apps. on Windows, macOS and Linux. Features: - Modify

Dec 30, 2022

Email and Password Authentication In Flutter & Firebase in Flutter 2.2

Email and Password Authentication In Flutter & Firebase in Flutter 2.2

Email and Password Authentication In Flutter & Firebase in Flutter 2.2

Nov 23, 2022

Learn Flutter on Flutter! A widget directory with implementation samples!

Learn Flutter on Flutter! A widget directory with implementation samples!

Fludget Browse through a variety of widgets used in flutter This application is developed to learn Flutter using Flutter. Different widgets used in fl

Nov 23, 2022

A Flutter package that makes it easy to customize and work with your Flutter desktop app window.

A Flutter package that makes it easy to customize and work with your Flutter desktop app window.

bitsdojo_window A Flutter package that makes it easy to customize and work with your Flutter desktop app window on Windows, macOS and Linux. Watch the

Dec 27, 2022
Comments
  • pePaytm.makePayment return JSON DATA

    pePaytm.makePayment return JSON DATA

    Well, I have followed all your instructions but, if return just data passed in JSON Form, this is what when the button is clicked:

    WhatsApp Image 2020-07-06 at 16 23 59

    NOTE: I am using Production Credentials and testing in a real device.

    CODE:

    Same as example file:

    onPressed: () async {
                                   
                                    PePaytm pePaytm = new PePaytm(
                  paymentURL:
                      'https://us-central1-pubgavatar-28b16.cloudfunctions.net/customFunctions/paymentReceipt');
    
              await pePaytm.makePayment(context,
                  order: Order(
                      orderId: DateTime.now().millisecondsSinceEpoch.toString(),
                      phoneNumber: '7777777777',
                      amount: '120',
                      custId: 'CUST123456',
                      email: '[email protected]'),
                    
                    );
                     // TODO send your data for payment
            
                                  },
    
    opened by rdcoder33 1
Owner
Harsh Tyagi
Web & APP Developer https://about.me/harshtyagimdr
Harsh Tyagi
Concepts used Flutter layout,State management, Blockchain integration, Http api integration, Smart contracts

HS_CryptoCoin_Wallet First project using Flutter with Blockchain Getting Started This project is a starting point for a Flutter application. A few res

Harsh Saxena 1 Dec 23, 2021
This is a Yoga app made in Flutter. This is an integration of a model that i found on https://www.uistore.design.

Yoguha A Flutter project made with Firebase that helps you for your next Yoga sessions. It contains : An authentication system A timer Some relaxing p

Scythe 2 Feb 1, 2022
This is an example project for Firebase integration using flutter.

Flutter Firebase Integration Example Project In this video we have shown how to create #Firebase app from firebase console and integrate that into #Fl

Flutter Tutorial 5 Jul 28, 2022
Full Feature Todos Flutter Mobile app with fireStore integration.

IONICFIREBASEAPP DOWNLOAD TODO APP Marketplace for Mobile app and Backend that developed on leading Enterprise Technologies with as well as with your

Ionicfirebaseapp 138 Nov 4, 2022
Sample app to demonstrate the integration and working of Dyte SDK for mobile, using Flutter.

Flutter Sample App by dyte Sample App to demonstrate Dyte SDK in flutter Explore the docs » View Demo · Report Bug · Request Feature Table of Contents

Dyte 12 Jan 1, 2023
Zaincash payment gateway integration for flutter

zaincash_flutter A none offical Zaincash payment gateway integration for flutter INSTALL in your project terminal enter dart pub add zaincash USE F

Karrar S. Honi 1 May 20, 2022
Studying Flutter and Firebase integration

Eventsapp Generated by the Very Good CLI ?? A Very Good Project created by Very

Felipe Gonçalves dos Reis 0 Dec 17, 2021
Plugin with native integration for WebSocket.

NOTE: This repository is no longer maintained by ENGAPP. It was moved to be maintained by Kunlatek on the following link: https://github.com/kunlatek/

EngApp 35 Sep 22, 2022
A basic implementation of the robot testing pattern for integration/e2e tests

robot A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is

Samuel Abada 3 Dec 13, 2021
Simple examples that help you get started with Appwrite + Dart (=❤️) as an Appwrite server-side integration.

Playground for Dart Simple examples that help you get started with Appwrite + Dart (= ❤️ ) This is Appwrite server side integration with Dart. For Flu

Appwrite 31 Nov 22, 2022