Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "pay-redoya", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "A module that made for using Redoya.NET Pay API very easier.", | ||
@@ -26,4 +26,4 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"jest": "^26.6.3" | ||
"jest": "^26.5.0" | ||
} | ||
} |
@@ -1,11 +0,15 @@ | ||
# node.pay.redoya | ||
# pay-redoya | ||
A module that mode for Redoya.NET Pay API | ||
# Installation | ||
SOON | ||
``npm i pay-redoya`` | ||
# Usage | ||
SOON | ||
# API | ||
## RedoyaPay.createOrderURL(price, isInTestMode, successfulURL, failURL, vendorToken, secret, expiresIn) | ||
Creates and returns a URL to redirect the customer to the link for making a payment. | ||
## await RedoyaPay.verifyOrder(orderId, vendorToken) | ||
Returns an object with the order result. [Click to see the API docs for more information. (Look at API > POST /api/v1/order/verify/:orderId section.)](http://docs.pay.redoya.net/en/Full.html) | ||
# Example | ||
SOON | ||
[Check example folder.](./example/index.js) |
@@ -9,4 +9,5 @@ const { post } = require('axios'); | ||
}).catch((err) => { | ||
throw new Error(JSON.stringify(err)); | ||
if (error.response.data) return error.response.data; | ||
throw new Error("Unknown Axios error!" + JSON.stringify(err)); | ||
}); | ||
}; |
@@ -5,3 +5,3 @@ const Validator = require('fastest-validator'); | ||
const orderCreationArgs = { | ||
price: { type: 'number', positive: true, integer: true, min: 3, max: 1000 }, | ||
price: { type: 'number', positive: true, min: 3, max: 1000 }, | ||
isInTestMode: { type: 'number', integer: true, min: 0, max: 1 }, | ||
@@ -8,0 +8,0 @@ successfulURL: { type: 'string', min: 16, max: 1200 }, |
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
39592
60
15
8