New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

irpayments

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

irpayments - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

test/idpay.js

5

package.json
{
"name": "irpayments",
"version": "1.1.3",
"version": "1.1.4",
"description": "IR Payments, a package for all payment gateways of IRAN",
"main": "src/index.js",
"scripts": {
"build-docs": "node_modules/.bin/jsdoc --configure jsdoc.json --verbose"
"build-docs": "node_modules/.bin/jsdoc --configure jsdoc.json --verbose",
"test-idpay": "node test/idpay.js"
},

@@ -9,0 +10,0 @@ "keywords": [

31

src/Structers/Request.js

@@ -1,2 +0,2 @@

const { default: axios } = require("axios");
const { default: axios, Axios } = require("axios");

@@ -28,3 +28,3 @@ /**

{
this.BaseURL = ServerURL;
this.#BaseURL = ServerURL;

@@ -42,11 +42,20 @@ /**

method = method.toLowerCase();
return axios[method]
(
uri,
{
baseURL: this.BaseURL,
data: ('data' in params && params['data']) ? params.data : null,
Headers: ('Headers' in params && params['Headers']) ? params.Headers : null,
}
);
let headerObject = {
'content-type': 'application/json'
}
if(method == 'get')
return axios['get'](uri, {
baseURL: this.#BaseURL,
data: ('data' in params && params['data']) ? params.data : null,
Headers: ('Headers' in params && params['Headers']) ? {...params.Headers, ...headerObject} : headerObject,
})
else if(method == 'post')
{
return axios['post'](uri, ('data' in params && params['data']) ? params.data : null, {
baseURL: this.#BaseURL,
headers: ('Headers' in params && params['Headers']) ? {...params.Headers, ...headerObject} : headerObject,
})
}
}

@@ -53,0 +62,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc