File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
src/Umbraco.Commerce.Checkout/Views/UmbracoCommerceCheckout Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 42
42
@foreach (var item in paymentMethods .Where (x => zeroValuePaymentMethod == null || x .Alias != zeroValuePaymentMethod .Alias )
43
43
.Select ((pm , i ) => new { PaymentMethod = pm , Index = i }))
44
44
{
45
- < li class = " border-gray-300 @(item.Index > 0 ? " border - t " : " " )" >
46
- < label class = " flex items-center py-4 px-4 cursor-pointer hover:bg-gray-50" >
47
- < input name = " paymentMethod" type = " radio" value = " @item.PaymentMethod.Id" class = " mr-3" @Html .Raw (currentPaymentMethodId .HasValue && currentPaymentMethodId .Value == item .PaymentMethod .Id ? " checked=\" checked\" " : " " ) required / >
48
- < span class = " font-medium" > @(item .PaymentMethod .Name )< / span >
49
- < span class = " flex-1 text-right" > @(item .PaymentMethod .CalculatePrice ()? .Formatted ())< / span >
50
- < / label >
51
- < / li >
45
+ var fee = item .PaymentMethod .TryCalculateFee (currentOrder );
46
+ if (fee .Success )
47
+ {
48
+ < li class = " border-gray-300 @(item.Index > 0 ? " border - t " : " " )" >
49
+ < label class = " flex items-center py-4 px-4 cursor-pointer hover:bg-gray-50" >
50
+ < input name = " paymentMethod" type = " radio" value = " @item.PaymentMethod.Id" class = " mr-3" @Html .Raw (currentPaymentMethodId .HasValue && currentPaymentMethodId .Value == item .PaymentMethod .Id ? " checked=\" checked\" " : " " ) required / >
51
+ < span class = " font-medium" > @(item .PaymentMethod .Name )< / span >
52
+ < span class = " flex-1 text-right" > @(fee .Result ? .Formatted ())< / span >
53
+ < / label >
54
+ < / li >
55
+ }
52
56
}
53
57
< / ul >
54
58
}
You can’t perform that action at this time.
0 commit comments