@@ -21,20 +21,17 @@ namespace Umbraco.Commerce.Checkout.Events
21
21
public class SyncZeroValuePaymentProviderContinueUrl : INotificationAsyncHandler < ContentCacheRefresherNotification >
22
22
{
23
23
private readonly IUmbracoCommerceApi _commerceApi ;
24
- private readonly INavigationQueryService _navigationQueryService ;
25
- private readonly IPublishedContentCache _publishedContentCacheService ;
26
- private readonly IPublishedContentTypeCache _publishedContentTypeCacheService ;
24
+ private readonly IDocumentNavigationQueryService _documentNavigationQueryService ;
25
+ private readonly IPublishedContentCache _publishedContentCache ;
27
26
28
27
public SyncZeroValuePaymentProviderContinueUrl (
29
28
IUmbracoCommerceApi commerceApi ,
30
- INavigationQueryService navigationQueryService ,
31
- IPublishedContentCache publishedContentCacheService ,
32
- IPublishedContentTypeCache publishedContentTypeCacheService )
29
+ IDocumentNavigationQueryService documentNavigationQueryService ,
30
+ IPublishedContentCache publishedContentCache )
33
31
{
34
32
_commerceApi = commerceApi ;
35
- _navigationQueryService = navigationQueryService ;
36
- _publishedContentCacheService = publishedContentCacheService ;
37
- _publishedContentTypeCacheService = publishedContentTypeCacheService ;
33
+ _documentNavigationQueryService = documentNavigationQueryService ;
34
+ _publishedContentCache = publishedContentCache ;
38
35
}
39
36
40
37
public async Task HandleAsync ( ContentCacheRefresherNotification notification , CancellationToken cancellationToken )
@@ -56,7 +53,7 @@ public async Task HandleAsync(ContentCacheRefresherNotification notification, Ca
56
53
if ( payload . ChangeTypes . HasType ( TreeChangeTypes . RefreshNode ) )
57
54
{
58
55
// Single node refresh
59
- IPublishedContent ? node = _publishedContentCacheService . GetById ( payload . Id ) ;
56
+ IPublishedContent ? node = _publishedContentCache . GetById ( payload . Id ) ;
60
57
if ( node != null && IsConfirmationPageType ( node ) )
61
58
{
62
59
await DoSyncZeroValuePaymentProviderContinueUrlAsync ( node ) ;
@@ -65,12 +62,12 @@ public async Task HandleAsync(ContentCacheRefresherNotification notification, Ca
65
62
else if ( payload . ChangeTypes . HasType ( TreeChangeTypes . RefreshBranch ) )
66
63
{
67
64
// Branch refresh
68
- IPublishedContent ? rootNode = _publishedContentCacheService . GetById ( payload . Id ) ;
69
- if ( rootNode != null && _navigationQueryService . TryGetDescendantsKeysOfType ( rootNode . Key , UmbracoCommerceCheckoutConstants . ContentTypes . Aliases . CheckoutStepPage , out IEnumerable < Guid > keys ) )
65
+ IPublishedContent ? rootNode = _publishedContentCache . GetById ( payload . Id ) ;
66
+ if ( rootNode != null && _documentNavigationQueryService . TryGetDescendantsKeysOfType ( rootNode . Key , UmbracoCommerceCheckoutConstants . ContentTypes . Aliases . CheckoutStepPage , out IEnumerable < Guid > keys ) )
70
67
{
71
68
foreach ( Guid key in keys )
72
69
{
73
- IPublishedContent ? node = _publishedContentCacheService . GetById ( key ) ;
70
+ IPublishedContent ? node = _publishedContentCache . GetById ( key ) ;
74
71
if ( node != null && IsConfirmationPageType ( node ) )
75
72
{
76
73
await DoSyncZeroValuePaymentProviderContinueUrlAsync ( node ) ;
@@ -80,15 +77,15 @@ public async Task HandleAsync(ContentCacheRefresherNotification notification, Ca
80
77
}
81
78
else if ( payload . ChangeTypes . HasType ( TreeChangeTypes . RefreshAll ) )
82
79
{
83
- if ( _navigationQueryService . TryGetRootKeys ( out IEnumerable < Guid > rootKeys ) )
80
+ if ( _documentNavigationQueryService . TryGetRootKeys ( out IEnumerable < Guid > rootKeys ) )
84
81
{
85
82
foreach ( Guid rootKey in rootKeys )
86
83
{
87
- if ( _navigationQueryService . TryGetDescendantsKeysOfType ( rootKey , UmbracoCommerceCheckoutConstants . ContentTypes . Aliases . CheckoutStepPage , out IEnumerable < Guid > keys ) )
84
+ if ( _documentNavigationQueryService . TryGetDescendantsKeysOfType ( rootKey , UmbracoCommerceCheckoutConstants . ContentTypes . Aliases . CheckoutStepPage , out IEnumerable < Guid > keys ) )
88
85
{
89
86
foreach ( Guid key in keys )
90
87
{
91
- IPublishedContent ? node = _publishedContentCacheService . GetById ( key ) ;
88
+ IPublishedContent ? node = _publishedContentCache . GetById ( key ) ;
92
89
if ( node != null && IsConfirmationPageType ( node ) )
93
90
{
94
91
await DoSyncZeroValuePaymentProviderContinueUrlAsync ( node ) ;
0 commit comments