@setu/upi-deep-links
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@setu/upi-deep-links", | ||
"version": "1.0.0", | ||
"description": "NPM package to connect to Setu's UPI Deep Link APIs", | ||
"main": "src/setu.js", | ||
"scripts": { | ||
"start": "node src/setu.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/SetuHQ/npm-upi-deep-links.git" | ||
}, | ||
"keywords": [ | ||
"setu", | ||
"upi" | ||
], | ||
"author": "Nithin Kashyap <nithin@setu.co>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/SetuHQ/npm-upi-deep-links/issues" | ||
}, | ||
"homepage": "https://github.com/SetuHQ/npm-upi-deep-links#readme", | ||
"dependencies": { | ||
"axios": "^0.19.2", | ||
"jsonwebtoken": "^8.5.1", | ||
"uuid": "^8.3.0" | ||
}, | ||
"devDependencies": {} | ||
"name": "@setu/upi-deep-links", | ||
"version": "1.0.1", | ||
"description": "NPM package to connect to Setu's UPI Deep Link APIs", | ||
"main": "src/setu.js", | ||
"scripts": { | ||
"start": "node src/setu.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/SetuHQ/npm-upi-deep-links.git" | ||
}, | ||
"keywords": [ | ||
"setu", | ||
"upi" | ||
], | ||
"author": "Nithin Kashyap <nithin@setu.co>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/SetuHQ/npm-upi-deep-links/issues" | ||
}, | ||
"homepage": "https://github.com/SetuHQ/npm-upi-deep-links#readme", | ||
"dependencies": { | ||
"axios": "^0.19.2", | ||
"jsonwebtoken": "^8.5.1", | ||
"uuid": "^8.3.0" | ||
}, | ||
"devDependencies": {} | ||
} |
@@ -28,2 +28,3 @@ # Setu | ||
setuProductInstanceId: "YOUR PRODUCT INSTANCE ID", | ||
setuProductInstanceId: "PRODUCTION | SANDBOX" | ||
}); | ||
@@ -30,0 +31,0 @@ ``` |
@@ -7,7 +7,7 @@ // Required helpers | ||
class Setu { | ||
secrets = {}; | ||
endpoints = {}; | ||
mode = 'SANDBOX'; | ||
constructor(data) { | ||
this.secrets = {}; | ||
this.endpoints = {}; | ||
this.secrets.schemeId = data.schemeId || null; | ||
@@ -20,5 +20,7 @@ this.secrets.jwtSecret = data.jwtSecret || null; | ||
sayHi = () => console.log('Setu says Hi!'); | ||
sayHi() { | ||
console.log('Setu says Hi!'); | ||
} | ||
checkIfValuesExist = () => { | ||
checkIfValuesExist() { | ||
if ( | ||
@@ -35,5 +37,5 @@ !this.secrets.schemeId || | ||
displaySetValues = () => { | ||
displaySetValues() { | ||
if (this.checkIfValuesExist()) { | ||
console.info(JSON.stringify(this.secrets)); | ||
console.info(JSON.stringify({...this.secrets, ...this.endpoints})); | ||
} else { | ||
@@ -44,3 +46,3 @@ console.info('Required values are not set'); | ||
createPaymentLink = (body) => { | ||
createPaymentLink(body) { | ||
if (this.checkIfValuesExist()) { | ||
@@ -55,3 +57,3 @@ return requestHelper.post( | ||
checkPaymentStatus = (platformBillID = null) => { | ||
checkPaymentStatus(platformBillID = null) { | ||
if (this.checkIfValuesExist() && !!platformBillID) { | ||
@@ -66,3 +68,3 @@ return requestHelper.get( | ||
triggerMockPayment = (body) => { | ||
triggerMockPayment(body) { | ||
if (this.checkIfValuesExist() && this.mode === 'SANDBOX') { | ||
@@ -77,3 +79,3 @@ return requestHelper.post( | ||
retreiveReports = (body) => { | ||
retreiveReports(body) { | ||
if (this.checkIfValuesExist()) { | ||
@@ -80,0 +82,0 @@ return requestHelper.post( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
205
60
9495