|
1 | 1 | // requests
|
2 |
| -import { AccountHolderNotificationRequest } from "../typings/configurationWebhooks/accountHolderNotificationRequest"; |
3 |
| -import { BalanceAccountNotificationRequest } from "../typings/configurationWebhooks/balanceAccountNotificationRequest"; |
4 |
| -import { AuthenticationNotificationRequest } from "../typings/acsWebhooks/authenticationNotificationRequest"; |
5 |
| -import { TransferNotificationRequest } from "../typings/transferWebhooks/transferNotificationRequest"; |
6 |
| -import { PaymentMethodScheduledForRemovalNotificationRequest } from "../typings/managementWebhooks/paymentMethodScheduledForRemovalNotificationRequest"; |
7 |
| -import { TransactionNotificationRequestV4 } from "../typings/transactionWebhooks/transactionNotificationRequestV4"; |
8 |
| -import { NegativeBalanceCompensationWarningNotificationRequest } from "../typings/negativeBalanceWarningWebhooks/negativeBalanceCompensationWarningNotificationRequest"; |
9 |
| -import { BalanceAccountBalanceNotificationRequest } from "../typings/balanceWebhooks/balanceAccountBalanceNotificationRequest"; |
| 2 | +import { AccountHolderNotificationRequest } from "../../typings/configurationWebhooks/accountHolderNotificationRequest"; |
| 3 | +import { BalanceAccountNotificationRequest } from "../../typings/configurationWebhooks/balanceAccountNotificationRequest"; |
| 4 | +import { AuthenticationNotificationRequest } from "../../typings/acsWebhooks/authenticationNotificationRequest"; |
| 5 | +import { TransferNotificationRequest } from "../../typings/transferWebhooks/transferNotificationRequest"; |
| 6 | +import { PaymentMethodScheduledForRemovalNotificationRequest } from "../../typings/managementWebhooks/paymentMethodScheduledForRemovalNotificationRequest"; |
| 7 | +import { TransactionNotificationRequestV4 } from "../../typings/transactionWebhooks/transactionNotificationRequestV4"; |
| 8 | +import { NegativeBalanceCompensationWarningNotificationRequest } from "../../typings/negativeBalanceWarningWebhooks/negativeBalanceCompensationWarningNotificationRequest"; |
| 9 | +import { BalanceAccountBalanceNotificationRequest } from "../../typings/balanceWebhooks/balanceAccountBalanceNotificationRequest"; |
10 | 10 |
|
11 | 11 | // handlers
|
12 |
| -import { AcsWebhooksHandler } from "../typings/acsWebhooks/acsWebhooksHandler"; |
13 |
| -import { ReportWebhooksHandler } from "../typings/reportWebhooks/reportWebhooksHandler"; |
14 |
| -import { ConfigurationWebhooksHandler } from "../typings/configurationWebhooks/configurationWebhooksHandler"; |
15 |
| -import { TransferWebhooksHandler } from "../typings/transferWebhooks/transferWebhooksHandler"; |
16 |
| -import { NegativeBalanceWarningWebhooksHandler } from "../typings/negativeBalanceWarningWebhooks/negativeBalanceWarningWebhooksHandler"; |
17 |
| -import { TransactionWebhooksHandler } from "../typings/transactionWebhooks/transactionWebhooksHandler"; |
18 |
| -import { BalanceWebhooksHandler } from "../typings/balanceWebhooks/balanceWebhooksHandler"; |
19 |
| -import { ReportNotificationRequest } from "../typings/reportWebhooks/reportNotificationRequest"; |
| 12 | +import { AcsWebhooksHandler } from "../../typings/acsWebhooks/acsWebhooksHandler"; |
| 13 | +import { ReportWebhooksHandler } from "../../typings/reportWebhooks/reportWebhooksHandler"; |
| 14 | +import { ConfigurationWebhooksHandler } from "../../typings/configurationWebhooks/configurationWebhooksHandler"; |
| 15 | +import { TransferWebhooksHandler } from "../../typings/transferWebhooks/transferWebhooksHandler"; |
| 16 | +import { NegativeBalanceWarningWebhooksHandler } from "../../typings/negativeBalanceWarningWebhooks/negativeBalanceWarningWebhooksHandler"; |
| 17 | +import { TransactionWebhooksHandler } from "../../typings/transactionWebhooks/transactionWebhooksHandler"; |
| 18 | +import { BalanceWebhooksHandler } from "../../typings/balanceWebhooks/balanceWebhooksHandler"; |
| 19 | +import { ReportNotificationRequest } from "../../typings/reportWebhooks/reportNotificationRequest"; |
20 | 20 |
|
21 | 21 | describe("BankingWebhooks Tests", function (): void {
|
22 | 22 |
|
@@ -112,12 +112,6 @@ describe("BankingWebhooks Tests", function (): void {
|
112 | 112 |
|
113 | 113 | });
|
114 | 114 |
|
115 |
| - it("should verify the banking hmac", function (): void { |
116 |
| - const jsonString = "{\"data\":{\"balancePlatform\":\"Integration_tools_test\",\"accountId\":\"BA32272223222H5HVKTBK4MLB\",\"sweep\":{\"id\":\"SWPC42272223222H5HVKV6H8C64DP5\",\"schedule\":{\"type\":\"balance\"},\"status\":\"active\",\"targetAmount\":{\"currency\":\"EUR\",\"value\":0},\"triggerAmount\":{\"currency\":\"EUR\",\"value\":0},\"type\":\"pull\",\"counterparty\":{\"balanceAccountId\":\"BA3227C223222H5HVKT3H9WLC\"},\"currency\":\"EUR\"}},\"environment\":\"test\",\"type\":\"balancePlatform.balanceAccountSweep.updated\"}"; |
117 |
| - const isValid = hmacValidator.validateHMACSignature("D7DD5BA6146493707BF0BE7496F6404EC7A63616B7158EC927B9F54BB436765F", "9Qz9S/0xpar1klkniKdshxpAhRKbiSAewPpWoxKefQA=", jsonString); |
118 |
| - expect(isValid).toBe(true); |
119 |
| - }); |
120 |
| - |
121 | 115 | it("should deserialize Transaction v4 Webhooks", function (): void {
|
122 | 116 | const json = {
|
123 | 117 | "data": {
|
|
0 commit comments