Giter Club home page Giter Club logo

sampleapp-payments-nodejs's Introduction

Rate your SampleYesNo

Intuit Payment Sample - NodeJS

Overview

This is a Sample app built using Node.js and Express Framework to showcase how to make API calls using the Intuit-Payment API's

APP screenshots

Installation

Requirements

Via Github Repo (Recommended)

$ git clone https://github.com/IntuitDeveloper/SampleApp-Payments-Nodejs
$ cd SampleApp-Payments-Nodejs
$ npm install

Pre-requisites

Create an App

  • Create an Intuit Developer account and app:
    You must have an Intuit Developer account and have created an app. To know more refer to Get Started
  • Create an App with Payment Scope:
    Login to Developer Portal and click on My Apps on the top right corner and create an App as shown below
    APP screenshots1 Select the Payments scope while creating the app. APP screenshots2

Get Access Token from OAuth Playground

  • Get AccessToken:
    Use OAuth Playground to get the OAuth2.0 accessToken from the app you just created above.
    Note: Please make sure to select Payment Scope
    APP screenshots3

Configuration

Copy the contents from .env.example to .env from the root directory:

$ cp .env.example .env

Edit the .env file to add your:

  • ACCESS_TOKEN: You can generate accessToken using the OAuth Playground
  • NGROK_ENABLED:(optional) By default it is set to false. If you want to serve the Sample App over HTTPS, set the variable to true
  • PORT:(optional) Optional port number for the app to be served

** Please note, that we are testing this Sample in Sandbox Environment. To test in Production please use the below .env variables:

  • TOKEN_URL=https://sandbox.api.intuit.com/quickbooks/v4/payments/tokens
  • CHARGE_URL=https://sandbox.api.intuit.com/quickbooks/v4/payments/charges

TLS / SSL (optional)

If you want your enpoint to be exposed over the internet. The easiest way to do that while you are still developing your code locally is to use ngrok.

You dont have to worry about installing ngrok. The sample application does that for you.

  1. Just set NGROK_ENABLED = true in .env

Usage

$ npm start

Without ngrok (if you are using localhost i.e NGROK_ENABLED=false in .env)

You will see an URL as below:

๐Ÿ’ป Server listening on port 8000  
๐Ÿ’ณ See the Sample App in your browser: http://localhost:8000

With ngrok (if you are using ngrok i.e NGROK_ENABLED=true in .env)

Your will see an URL as below :

๐Ÿ’ป Server listening on port 8000  
๐Ÿ’ณ See the Sample App in your browser: https://9b4ee833.ngrok.io

Click on the URL and follow through the instructions given in the sample app.

Running Sample-Payments-Nodejs App on Heroku

If you already have an Heroku account, you can use Heroku One-Button Deployment to deploy this sample and test it right away.

Deploy

Unable to follow ? Please use the link below to follow the step by step procedure to get started with this sample:

Instructions to Get Started with this Sample App

Links

Project Repo

Intuit Payment API Reference

Intuit Payments API Explorer

Contributions

Any reports of problems, comments or suggestions are most welcome.

Please report these on Issue Tracker in Github.

sampleapp-payments-nodejs's People

Contributors

abisalehalliprasan avatar rkasaraneni20 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sampleapp-payments-nodejs's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.