Skip to content

Commit 8e70a97

Browse files
committed
Rename file
1 parent 76642a4 commit 8e70a97

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tools/hmac/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Note: make sure you are using the HMAC key used to generate the signature associ
88
### Payments webhooks
99

1010
Copy the content of the webhook in the payload.json (or provide a different file), then run with:
11-
`node hmacValidatorPayments.js {hmacKey} {path to JSON file}`
11+
`node calculateHmacPayments.js {hmacKey} {path to JSON file}`
1212
```
1313
cd tools/hmac
14-
node hmacValidatorPayments.js 11223344D785FBAE710E7F943F307971BB61B21281C98C9129B3D4018A57B2EB tools/hmac/payload.json
14+
node calculateHmacPayments.js 11223344D785FBAE710E7F943F307971BB61B21281C98C9129B3D4018A57B2EB payload.json
1515
```
1616

tools/hmac/hmacValidatorPayments.js renamed to tools/hmac/calculateHmacPayments.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// script to calculate the HMAC signature of Payments webhooks (where the signature is calculated considering
22
// a subset of the fields in the payload - i.e. NotificationRequestItem object)
33
//
4-
// Run with: `node hmacValidatorPayments.js {hmacKey} {path to JSON file}
4+
// Run with: `node calculateHmacPayments.js {hmacKey} {path to JSON file}
55
//
66
// cd tools/hmac
7-
// node hmacValidatorPayments.js 11223344D785FBAE710E7F943F307971BB61B21281C98C9129B3D4018A57B2EB payload.json
7+
// node calculateHmacPayments.js 11223344D785FBAE710E7F943F307971BB61B21281C98C9129B3D4018A57B2EB payload.json
88

99
const fs = require('fs');
1010
const { hmacValidator } = require('@adyen/api-library');
1111

1212
// Ensure correct arguments
1313
if (process.argv.length !== 4) {
14-
console.error("Usage: node HMACValidatorPayments.js <hmacKey> <payloadFile>");
14+
console.error("Usage: node calculateHmacPayments.js <hmacKey> <payloadFile>");
1515
process.exit(1);
1616
}
1717

@@ -55,5 +55,5 @@ if (!notificationRequestItem) {
5555
const validator = new hmacValidator()
5656
const hmacSignature = validator.calculateHmac(notificationRequestItem, hmacKey);
5757

58-
console.log(`HMAC Validation Result: ${hmacSignature}`);
58+
console.log(`HMAC signature: ${hmacSignature}`);
5959
process.exit(0);

0 commit comments

Comments
 (0)