Skip to content

Commit

Permalink
Release 4.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wallee-deployment-user committed Jan 26, 2024
1 parent 04f1610 commit 08d60ff
Show file tree
Hide file tree
Showing 113 changed files with 598 additions and 511 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,43 @@ let transactionService: Wallee.api.TransactionService = new Wallee.api.Transacti
transactionService.timeout = 15;
```

### Integrating Webhook Payload Signing Mechanism into webhook callback handler

The HTTP request which is sent for a state change of an entity now includes an additional field `state`, which provides information about the update of the monitored entity's state. This enhancement is a result of the implementation of our webhook encryption mechanism.

Payload field `state` provides direct information about the state update of the entity, making additional API calls to retrieve the entity state redundant.

#### ⚠️ Warning: Generic Pseudocode

> **The provided pseudocode is intentionally generic and serves to illustrate the process of enhancing your API to leverage webhook payload signing. It is not a complete implementation.**
>
> Please ensure that you adapt and extend this code to meet the specific needs of your application, including appropriate security measures and error handling.
For a detailed webhook payload signing mechanism understanding we highly recommend referring to our comprehensive
[Webhook Payload Signing Documentation](https://app-wallee.com/doc/webhooks#_webhook_payload_signing_mechanism).
```
app.post('/webhook/callback', (req: Request, res: Response) => {
const requestPayload: string = req.body;
const signature: string | undefined = req.headers['x-signature'] as string;
if (!signature) {
// Make additional API call to retrieve the entity state
// ...
} else {
if (webhookEncryptionService().isContentValid(signature, requestPayload)) {
// Parse requestPayload to extract 'state' value
// Process entity's state change
// ...
}
}
// Process the received webhook data
// ...
});
```



## License

Please see the [license file](https://github.com/wallee-payment/typescript-sdk/blob/master/LICENSE) for more information.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wallee",
"title": "wallee",
"version": "4.4.0",
"version": "4.5.0",
"description": "TypeScript/JavaScript client for wallee",
"homepage": "http://github.com/wallee-payment/typescript-sdk",
"repository": {
Expand Down
12 changes: 6 additions & 6 deletions src/api/AccountService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class AccountService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -172,7 +172,7 @@ class AccountService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -255,7 +255,7 @@ class AccountService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -342,7 +342,7 @@ class AccountService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -424,7 +424,7 @@ class AccountService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -507,7 +507,7 @@ class AccountService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down
12 changes: 6 additions & 6 deletions src/api/AnalyticsQueryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class AnalyticsQueryService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -198,7 +198,7 @@ class AnalyticsQueryService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -289,7 +289,7 @@ class AnalyticsQueryService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -365,7 +365,7 @@ class AnalyticsQueryService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -451,7 +451,7 @@ class AnalyticsQueryService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -533,7 +533,7 @@ class AnalyticsQueryService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down
12 changes: 6 additions & 6 deletions src/api/ApplicationUserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ApplicationUserService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -173,7 +173,7 @@ class ApplicationUserService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -256,7 +256,7 @@ class ApplicationUserService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -343,7 +343,7 @@ class ApplicationUserService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -425,7 +425,7 @@ class ApplicationUserService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -508,7 +508,7 @@ class ApplicationUserService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down
6 changes: 3 additions & 3 deletions src/api/BankAccountService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class BankAccountService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -194,7 +194,7 @@ class BankAccountService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -286,7 +286,7 @@ class BankAccountService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down
6 changes: 3 additions & 3 deletions src/api/BankTransactionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class BankTransactionService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -194,7 +194,7 @@ class BankTransactionService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -286,7 +286,7 @@ class BankTransactionService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down
4 changes: 2 additions & 2 deletions src/api/CardProcessingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class CardProcessingService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -235,7 +235,7 @@ class CardProcessingService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down
6 changes: 3 additions & 3 deletions src/api/ChargeAttemptService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class ChargeAttemptService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -194,7 +194,7 @@ class ChargeAttemptService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -286,7 +286,7 @@ class ChargeAttemptService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down
6 changes: 3 additions & 3 deletions src/api/ChargeBankTransactionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class ChargeBankTransactionService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -194,7 +194,7 @@ class ChargeBankTransactionService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down Expand Up @@ -286,7 +286,7 @@ class ChargeBankTransactionService {
Object.assign(headers, options.headers);

let defaultHeaders = {
"x-meta-sdk-version": "4.4.0",
"x-meta-sdk-version": "4.5.0",
"x-meta-sdk-language": "typescript",
"x-meta-sdk-provider": "wallee",
"x-meta-sdk-language-version": this.getVersion(),
Expand Down
Loading

0 comments on commit 08d60ff

Please sign in to comment.