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

zarinpal-typescript

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zarinpal-typescript - npm Package Compare versions

Comparing version

to
2.0.1

2

package.json
{
"name": "zarinpal-typescript",
"version": "2.0.0",
"version": "2.0.1",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -19,3 +19,3 @@ Simple Zarinpal package written in TypeScript.

// Get Authority
const authority = await zp.requestPayment({
const request = await zp.requestPayment({
amount: 1000,

@@ -25,7 +25,19 @@ callbackUrl: 'https://myCallbackUrl.com',

});
// Check for errors
if (request.errorMessage) {
throw new Error(request.errorMessage);
}
// Get Payment Url
const paymentUrl = zp.startPayment(authority);
// Verify Payment
const refId = await zp.verifyPayment({ amount: 1000, authority });
const verify = await zp.verifyPayment({ amount: 1000, authority });
// Check for errors
if (verify.errorMessage) {
throw new Error(verify.errorMessage);
}
})();
```