Skip to content

Commit

Permalink
Add RetryCount and RetryDelay to WebhookEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien Nikolaou committed Nov 5, 2024
1 parent 198d3e6 commit 4407904
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to `sebdesign/laravel-viva-payments` will be documented in t
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.1.4] - 2024-11-05

### Added

- Add `RetryCount` and `RetryDelay` to `WebhookEvent`

## [6.1.3] - 2024-09-02

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ parameters:
TransactionPaymentCreatedArray: 'array{Moto:bool, Email:string, Phone:?string, BankId:string, Systemic:bool, Switching:bool, ParentId:?string, Amount:float, ChannelId:string, TerminalId:?int, MerchantId:string, OrderCode:string, ProductId:?string, StatusId:string, FullName:string, ResellerId:?string, InsDate:string, TotalFee:float, CardUniqueReference:?string, CardToken:string, CardNumber:string, TipAmount:float, SourceCode:string, SourceName:string, Latitude:?float, Longitude:?float, CompanyName:?String, TransactionId:string, CompanyTitle:?string, PanEntryMode:?string, ReferenceNumber:int, ResponseCode:?string, CurrencyCode:string, OrderCulture:string, MerchantTrns:?string, CustomerTrns:string, IsManualRefund:bool, TargetPersonId:?string, TargetWalletId:?string, LoyaltyTriggered:bool, TransactionTypeId:int, TotalInstallments:int, CardCountryCode:?string, CardIssuingBank:?string, RedeemedAmount:int, ClearanceDate:?int, CurrentInstallment:?int, Tags:string[], BillId:?string, ResellerSourceCode:?string, ResellerSourceName:?string, ResellerCompanyName:?string, ResellerSourceAddress:?string, CardExpirationDate:?string, RetrievalReferenceNumber:?string, AssignedMerchantUsers:string[], AssignedResellerUsers:string[], CardTypeId:?int, DigitalWalletId:?int, ResponseEventId:?string, ElectronicCommerceIndicator:?string, BinId:?string, Ucaf:?string, DualMessage:?string, AcquirerApproved:?string, AuthorizationId:?string, OrderServiceId:?int, ConnectedAccountId:?string, MerchantCategoryCode:?int, ServiceId:?string, ExternalTransactionId:?string, ApplicationIdentifierTerminal:?string, Descriptor:?string, ConversionRate:?float}'
TransactionArray: 'array{email:string, amount:float, orderCode:string, statusId:string, fullName:string, insDate:string, cardNumber:?string, currencyCode:string, customerTrns:string, merchantTrns:?string, transactionTypeId:int, recurringSupport:bool, totalInstallments:int, cardCountryCode:?string, cardIssuingBank:?string, currentInstallment:int, cardUniqueReference:?string, cardTypeId:?int, digitalWalletId:?int, bankId:string, switching:bool}'
WebhookEventDataArray: 'TransactionPaymentCreatedArray|TransactionFailedArray|array<string,mixed>'
WebhookEventArray: 'array{Url:string, EventData:WebhookEventDataArray, Created:string, CorrelationId:string, EventTypeId:int, Delay:?string, MessageId:string, RecipientId:string, MessageTypeId:int}'
WebhookEventArray: 'array{Url:string, EventData:WebhookEventDataArray, Created:string, CorrelationId:string, EventTypeId:int, Delay:?string, RetryCount:?int, RetryDelay:?string, MessageId:string, RecipientId:string, MessageTypeId:int}'

strictRules:
strictCalls: false
Expand Down
2 changes: 2 additions & 0 deletions src/Events/WebhookEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public function __construct(
public readonly string $CorrelationId,
public readonly WebhookEventType $EventTypeId,
public readonly ?string $Delay,
public readonly int $RetryCount,
public readonly ?string $RetryDelay,
public readonly string $MessageId,
public readonly string $RecipientId,
public readonly int $MessageTypeId,
Expand Down
2 changes: 2 additions & 0 deletions tests/Stubs/transaction-failed.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
"CorrelationId": "22-145-E823540F",
"EventTypeId": 1798,
"Delay": null,
"RetryCount": 17,
"RetryDelay": null,
"MessageId": "b2b46d3c-5bdb-4622-b281-d105616033bb",
"RecipientId": "11ac9cd4-c9ea-48d3-b414-1f10ce664aad",
"MessageTypeId": 512
Expand Down
2 changes: 2 additions & 0 deletions tests/Stubs/transaction-payment-created.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
"CorrelationId": "21-245-DB33F8C9",
"EventTypeId": 1796,
"Delay": null,
"RetryCount": 17,
"RetryDelay": null,
"MessageId": "e8b09fc2-d4a4-43fc-8251-acd87ad04d96",
"RecipientId": "bdf4c6b3-c26d-4046-b5df-5c443ec39d09",
"MessageTypeId": 512
Expand Down
2 changes: 2 additions & 0 deletions tests/Stubs/transaction-price-calculated.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"CorrelationId": "22-209-DEBD5F23",
"EventTypeId": 1799,
"Delay": null,
"RetryCount": 17,
"RetryDelay": null,
"MessageId": "1a0fda05-986e-4027-93e3-4b7ff0561425",
"RecipientId": "784e1924-0723-458d-9a17-d374fce5f9e8",
"MessageTypeId": 512
Expand Down

0 comments on commit 4407904

Please sign in to comment.