telr-nodejs
v1.0.4
Published
Telr Payment NodeJS
Downloads
23
Maintainers
Readme
Telr-nodejs
This nodejs module allows you to quickly and easily create orders and verify orders along with the detailed inquiries of customer transactions with telr using nodejs.
You can get auth_key and store_id from telr account menu >> integrations >> paymentPage and select configuration. isTest = 0 for live and 1 for test.
var telr = require("telr-nodejs")("YOUR_AUTH_KEY", "YOUR_STORE_ID", {
isTest: 0,
currency: "sar"
});
#TO CREATE AN ORDER:
telr.order({
orderId: 3378,
amount: 70.5,
returnUrl: "http://your-return-url.com",
declineUrl: "http://url-to-call-in-decline-transaction.com",
cancelUrl: "http://url-to-call-in-cancel-transaction.com",
description: "Your description"
}, function(err, response){
console.log(response);
});
#FETCH COMPLETE DETAILS OF ORDER & PAYMENT: Order reference is returned in response to create order method.
telr.status("YOUR-ORDER-REFERENCE-HERE"
, function(err, response){
console.log(response);
});
#GET ORDER STATUS: Order reference is returned in response to create order method.
telr.orderStatus("YOUR-ORDER-REFERENCE-HERE"
, function(err, response){
console.log(response);
});
#GET ORDER DETAILS: Order reference is returned in response to create order method.
telr.orderDetails("YOUR-ORDER-REFERENCE-HERE"
, function(err, response){
console.log(response);
});
#GET TRANSACTION STATUS: Order reference is returned in response to create order method.
telr.transactionStatus("YOUR-ORDER-REFERENCE-HERE"
, function(err, response){
console.log(response);
});
#GET TRANSACTION DETAILS: Order reference is returned in response to create order method.
telr.transactionDetails("YOUR-ORDER-REFERENCE-HERE"
, function(err, response){
console.log(response);
});
#GET CUSTOMER DETAILS: To fetch the details of the customer of selected order Order reference is returned in response to create order method.
telr.transactionDetails("YOUR-ORDER-REFERENCE-HERE"
, function(err, response){
console.log(response);
});
credits: This package is a detailed implmentation/ extension of https://github.com/alirizwan/telr-payment-nodejs