Signup Login with Authorize.net
The signup-login-module-with-authorizedotnet-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-authorizedotnet module, simply run the following command within your app's directory:
npm i signup-login-module-with-authorizedotnet-gateway --save
Development
var loopback = require;
Database Configuration:
var dbConfig = ; loopback.config.datasourceset;
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 properties configuration for payment integration with Authorize.net
Model Configuration:
var modelConfig =
Set Authorize.net keys
https://support.authorize.net/s/article/How-do-I-obtain-my-API-Login-ID-and-Transaction-Key
Note: if you havent created keys followvar authorizekeys = loopback.paymentKeysConfig.paymentKeysConfig
Authorize.net Merchant Details config
var paymentconfig = loopback.paymentConfiguration.paymentConfiguration
Set mail service and login details for configuring nodemailer module
var emailkeys =
Include following code in your index file:
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://localhost:3000/pingPOST Services:http://localhost:3000/users/signup //Signup and subscription creation will be happend with this servicehttp://localhost:3000/users/login // Login post body contains email and passwordhttp://localhost:3000/users/updateSubscription example: http://localhost:3000/users/getSubscriptionStatus example: http://localhost:3000/users/getSubscriptionDetails example: http://localhost:3000/users/cancelSubscription example: Get Services: http://localhost:3000/users/http://localhost:3000/users?id= // get user by id service, pass id here
Licence
MIT