Skip to content

Commit

Permalink
Make RetryCount nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien Nikolaou committed Jan 8, 2025
1 parent 5aee9a3 commit 76133ff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
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.5] - 2025-01-08

### Fixed

- Make `RetryCount` nullable

## [6.1.4] - 2024-11-05

### Added
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, RetryCount:?int, RetryDelay:?string, MessageId:string, RecipientId:string, MessageTypeId:int}'
WebhookEventArray: 'array{Url:string, EventData:WebhookEventDataArray, Created:string, CorrelationId:string, EventTypeId:value-of<\Sebdesign\VivaPayments\Enums\WebhookEventType>, Delay:?string, RetryCount:?int, RetryDelay:?string, MessageId:string, RecipientId:string, MessageTypeId:int}'

strictRules:
strictCalls: false
Expand Down
4 changes: 3 additions & 1 deletion src/Events/WebhookEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct(
public readonly string $CorrelationId,
public readonly WebhookEventType $EventTypeId,
public readonly ?string $Delay,
public readonly int $RetryCount,
public readonly ?int $RetryCount,
public readonly ?string $RetryDelay,
public readonly string $MessageId,
public readonly string $RecipientId,
Expand All @@ -44,6 +44,8 @@ public static function create(array $attributes): self
...$attributes,
'EventTypeId' => $eventType,
'EventData' => $eventData,
'RetryCount' => $attributes['RetryCount'] ?? null,
'RetryDelay' => $attributes['RetryDelay'] ?? null,
]);
}
}

0 comments on commit 76133ff

Please sign in to comment.