signup-login-with-payment-gateway
signup-login-with-payment-gateway
Last updated 2 years ago by atxwebdesigner1 .
UNLICENSED · Repository · Original npm · Tarball · package.json
$ cnpm install signup-login-with-payment-gateway 
SYNC missed versions from official npm registry.

Signup Login Module

The signup-login-with-payment-gateway module is a Node.js based loopback script and it provides a fastest way to create user signup and login services with authentication and payment subscription with Authorize.net.

Pre-requisites

Node.js , and the platform-specific tools needed to compile native NPM modules (which you may already have):

Installation

To install the signup-login-with-payment-gateway module, simply run the following command within your app's directory:

npm i  signup-login-with-payment-gateway --save

Development

var loopback = require("signup-login-with-payment-gateway");

Port Configuration:


var port = new loopback.port(port address);

Example:

var port = new loopback.port(8080);

Database Configuration:

var dbConfig = {"name":"","options":{	
	"host": "",
    "port": ,
    "url": "",
    "database": "",
    "password": "",
    "user": "",
    "connector": "" // connector name ex. mongodb or mysql
}};

var database = new loopback.datasource(dbConfig);
Note: No need to declare email, username and password in schema but you need to add required field for username if you want it as required field.

Must follow below model configuration for payment integration with Authorize.net

Model Configuration:

var modelConfig = {

   "name": "driver",
   "properties": {
   
   "firstname": {
      "type": "string"
    },
    "lastname": {
      "type": "string"
    },
    "username": {
      "type": "string",
      "required": true
    },
    "address": {
      "type": "string"
    },
	"city": {
      "type": "string"
    },
	"state": {
      "type": "string"
    },
    "country": {
      "type": "string"
    },
	"zip": {
      "type": "number"  
	  },
    "phone": {
      "type": "number"
    },
	"cardcode": {
      "type": "string"
    },
    "expiredate": {
      "type": "string",
      "required": true
    },
	"cardnumber": {
      "type": "number",
      "required": true
    },
	"interval_length": {
      "type": "number",
      "required": true
    }
  }
};	
 var model = new loopback.model(modelConfig); 

Set Authorize.net keys

Note: if you havent created keys follow https://support.authorize.net/s/article/How-do-I-obtain-my-API-Login-ID-and-Transaction-Key
var authorizekeys = {
    "apiLoginKey":"",  //Authorize.net APIloginkey
    "transactionKey":""  //Authorize.net transactionKey
} 
 new loopback.paymentKeysConfig(authorizekeys)

Include following code in your index file:

 var appStart = loopback.app;
 appStart.start();

Run following in your terminal to start the APP:

 npm start

Verify the deployment by navigating to your server address in your preferred browser.

http://host:port/explorer

Example:

http://localhost:8001/explorer

#Licence MIT

Current Tags

  • 1.0.8                                ...           latest (2 years ago)

9 Versions

  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (11)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |