cashfree-pg 5.0.7 → 5.0.8-node
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/api.ts +81 -81
- package/dist/api.js +81 -81
- package/dist/esm/api.js +81 -81
- package/docs/Webhook.md +1 -1
- package/package.json +5 -5
- package/tests/ordersV5.test.js +5 -5
package/docs/Webhook.md
CHANGED
|
@@ -12,7 +12,7 @@ Verify Webhook Signatures ([Docs](https://docs.cashfree.com/reference/pg-webhook
|
|
|
12
12
|
```javascript
|
|
13
13
|
app.post('/webhook', function (req, res) {
|
|
14
14
|
try {
|
|
15
|
-
const response = Cashfree.PGVerifyWebhookSignature(req.headers["x-webhook-signature"], req.rawBody, req.headers["x-webhook-timestamp"])
|
|
15
|
+
const response = Cashfree.PGVerifyWebhookSignature(req.headers["x-webhook-signature"], req.rawBody, req.headers["x-webhook-timestamp"]);
|
|
16
16
|
console.log(response.object)
|
|
17
17
|
} catch (err) {
|
|
18
18
|
console.log(err.message)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cashfree-pg",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.8-node",
|
|
4
4
|
"description": "Cashfree client for cashfree-pg",
|
|
5
5
|
"author": "Cashfree Payments",
|
|
6
6
|
"repository": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"test": "jest"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"axios": "1.8.4",
|
|
29
|
+
"@sentry/node": "^7.73.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/chai": "^4.3.10",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"@types/sinon": "^17.0.1",
|
|
37
37
|
"chai": "^4.3.10",
|
|
38
38
|
"jest": "^29.7.0",
|
|
39
|
+
"dotenv": "16.5.0",
|
|
39
40
|
"mocha-junit-reporter": "^2.2.1",
|
|
40
41
|
"sinon": "^17.0.1",
|
|
41
42
|
"ts-jest": "^29.1.1",
|
|
42
|
-
"typescript": "^4.9.5"
|
|
43
|
-
"dotenv": "^16.5.0"
|
|
43
|
+
"typescript": "^4.9.5"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/tests/ordersV5.test.js
CHANGED
|
@@ -64,7 +64,7 @@ test("Pay Card", async () => {
|
|
|
64
64
|
card_number: "4838305610460100",
|
|
65
65
|
card_holder_name: "Tushar Gupta",
|
|
66
66
|
card_expiry_mm: "06",
|
|
67
|
-
card_expiry_yy: "
|
|
67
|
+
card_expiry_yy: "30",
|
|
68
68
|
card_cvv: "123"
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -86,7 +86,7 @@ test("Pay Card with Empty CVV", async () => {
|
|
|
86
86
|
card_number: "4838305610460100",
|
|
87
87
|
card_holder_name: "Tushar Gupta",
|
|
88
88
|
card_expiry_mm: "06",
|
|
89
|
-
card_expiry_yy: "
|
|
89
|
+
card_expiry_yy: "30",
|
|
90
90
|
card_cvv: ""
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -217,7 +217,7 @@ test("Order Pay Card Payment Test", async () => {
|
|
|
217
217
|
card_number: "4838305610460100",
|
|
218
218
|
card_holder_name: "Tushar Gupta",
|
|
219
219
|
card_expiry_mm: "06",
|
|
220
|
-
card_expiry_yy: "
|
|
220
|
+
card_expiry_yy: "30",
|
|
221
221
|
card_cvv: "123",
|
|
222
222
|
},
|
|
223
223
|
},
|
|
@@ -239,7 +239,7 @@ test("Order Pay Card Payment with Empty CVV Test", async () => {
|
|
|
239
239
|
card_number: "4838305610460100",
|
|
240
240
|
card_holder_name: "Tushar Gupta",
|
|
241
241
|
card_expiry_mm: "06",
|
|
242
|
-
card_expiry_yy: "
|
|
242
|
+
card_expiry_yy: "30",
|
|
243
243
|
card_cvv: "",
|
|
244
244
|
},
|
|
245
245
|
},
|
|
@@ -282,4 +282,4 @@ test("Get Payments For an Order Test", async () => {
|
|
|
282
282
|
const { orderId } = await createOrderAndReturnSessionId();
|
|
283
283
|
const response = await cashfree.PGOrderFetchPayments(orderId);
|
|
284
284
|
expect(response.status).toBe(200);
|
|
285
|
-
});
|
|
285
|
+
});
|