1.0.4 • Published 6 years ago

telr-nodejs v1.0.4

Weekly downloads
52
License
GPL-3.0
Repository
github
Last release
6 years ago

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

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago