@@ -35,7 +35,7 @@ public partial class PaymentService : IPaymentService
3535 private readonly ShoppingCartSettings _shoppingCartSettings ;
3636 private readonly IProviderManager _providerManager ;
3737 private readonly ICurrencyService _currencyService ;
38- private readonly ICommonServices _commonServices ;
38+ private readonly ICommonServices _services ;
3939 private readonly IOrderTotalCalculationService _orderTotalCalculationService ;
4040
4141 #endregion
@@ -56,7 +56,7 @@ public PaymentService(
5656 ShoppingCartSettings shoppingCartSettings ,
5757 IProviderManager providerManager ,
5858 ICurrencyService currencyService ,
59- ICommonServices commonServices ,
59+ ICommonServices services ,
6060 IOrderTotalCalculationService orderTotalCalculationService )
6161 {
6262 this . _paymentMethodRepository = paymentMethodRepository ;
@@ -65,7 +65,7 @@ public PaymentService(
6565 this . _shoppingCartSettings = shoppingCartSettings ;
6666 this . _providerManager = providerManager ;
6767 this . _currencyService = currencyService ;
68- this . _commonServices = commonServices ;
68+ this . _services = services ;
6969 this . _orderTotalCalculationService = orderTotalCalculationService ;
7070 }
7171
@@ -171,7 +171,7 @@ public virtual IEnumerable<Provider<IPaymentMethod>> LoadActivePaymentMethods(
171171 _orderTotalCalculationService . GetShoppingCartSubTotal ( cart , out orderSubTotalDiscountAmountBase , out orderSubTotalAppliedDiscount ,
172172 out subTotalWithoutDiscountBase , out subTotalWithDiscountBase ) ;
173173
174- orderSubTotal = _currencyService . ConvertFromPrimaryStoreCurrency ( subTotalWithoutDiscountBase , _commonServices . WorkContext . WorkingCurrency ) ;
174+ orderSubTotal = _currencyService . ConvertFromPrimaryStoreCurrency ( subTotalWithoutDiscountBase , _services . WorkContext . WorkingCurrency ) ;
175175 }
176176
177177 compareAmount = orderSubTotal . Value ;
@@ -182,7 +182,7 @@ public virtual IEnumerable<Provider<IPaymentMethod>> LoadActivePaymentMethods(
182182 {
183183 orderTotal = _orderTotalCalculationService . GetShoppingCartTotal ( cart ) ?? decimal . Zero ;
184184
185- orderTotal = _currencyService . ConvertFromPrimaryStoreCurrency ( orderTotal . Value , _commonServices . WorkContext . WorkingCurrency ) ;
185+ orderTotal = _currencyService . ConvertFromPrimaryStoreCurrency ( orderTotal . Value , _services . WorkContext . WorkingCurrency ) ;
186186 }
187187
188188 compareAmount = orderTotal . Value ;
@@ -261,7 +261,7 @@ public virtual IEnumerable<Provider<IPaymentMethod>> LoadAllPaymentMethods(int s
261261 /// <returns>List of payment method objects</returns>
262262 public virtual IList < PaymentMethod > GetAllPaymentMethods ( )
263263 {
264- var paymentMethods = _commonServices . Cache . Get ( PAYMENTMETHOD_ALL_KEY , ( ) =>
264+ var paymentMethods = _services . Cache . Get ( PAYMENTMETHOD_ALL_KEY , ( ) =>
265265 {
266266 var methods = _paymentMethodRepository . TableUntracked . ToList ( ) ;
267267
@@ -298,9 +298,9 @@ public virtual void InsertPaymentMethod(PaymentMethod paymentMethod)
298298
299299 _paymentMethodRepository . Insert ( paymentMethod ) ;
300300
301- _commonServices . Cache . RemoveByPattern ( PAYMENTMETHOD_ALL_KEY ) ;
301+ _services . Cache . RemoveByPattern ( PAYMENTMETHOD_ALL_KEY ) ;
302302
303- _commonServices . EventPublisher . EntityInserted ( paymentMethod ) ;
303+ _services . EventPublisher . EntityInserted ( paymentMethod ) ;
304304 }
305305
306306 /// <summary>
@@ -314,9 +314,9 @@ public virtual void UpdatePaymentMethod(PaymentMethod paymentMethod)
314314
315315 _paymentMethodRepository . Update ( paymentMethod ) ;
316316
317- _commonServices . Cache . RemoveByPattern ( PAYMENTMETHOD_ALL_KEY ) ;
317+ _services . Cache . RemoveByPattern ( PAYMENTMETHOD_ALL_KEY ) ;
318318
319- _commonServices . EventPublisher . EntityUpdated ( paymentMethod ) ;
319+ _services . EventPublisher . EntityUpdated ( paymentMethod ) ;
320320 }
321321
322322 /// <summary>
@@ -330,9 +330,9 @@ public virtual void DeletePaymentMethod(PaymentMethod paymentMethod)
330330
331331 _paymentMethodRepository . Delete ( paymentMethod ) ;
332332
333- _commonServices . Cache . RemoveByPattern ( PAYMENTMETHOD_ALL_KEY ) ;
333+ _services . Cache . RemoveByPattern ( PAYMENTMETHOD_ALL_KEY ) ;
334334
335- _commonServices . EventPublisher . EntityDeleted ( paymentMethod ) ;
335+ _services . EventPublisher . EntityDeleted ( paymentMethod ) ;
336336 }
337337
338338
@@ -481,7 +481,7 @@ public virtual CapturePaymentResult Capture(CapturePaymentRequest capturePayment
481481 catch ( NotSupportedException )
482482 {
483483 var result = new CapturePaymentResult ( ) ;
484- result . AddError ( _commonServices . Localization . GetResource ( "Common.Payment.NoCaptureSupport" ) ) ;
484+ result . AddError ( _services . Localization . GetResource ( "Common.Payment.NoCaptureSupport" ) ) ;
485485 return result ;
486486 }
487487 catch
@@ -536,7 +536,7 @@ public virtual RefundPaymentResult Refund(RefundPaymentRequest refundPaymentRequ
536536 catch ( NotSupportedException )
537537 {
538538 var result = new RefundPaymentResult ( ) ;
539- result . AddError ( _commonServices . Localization . GetResource ( "Common.Payment.NoRefundSupport" ) ) ;
539+ result . AddError ( _services . Localization . GetResource ( "Common.Payment.NoRefundSupport" ) ) ;
540540 return result ;
541541 }
542542 catch
@@ -578,7 +578,7 @@ public virtual VoidPaymentResult Void(VoidPaymentRequest voidPaymentRequest)
578578 catch ( NotSupportedException )
579579 {
580580 var result = new VoidPaymentResult ( ) ;
581- result . AddError ( _commonServices . Localization . GetResource ( "Common.Payment.NoVoidSupport" ) ) ;
581+ result . AddError ( _services . Localization . GetResource ( "Common.Payment.NoVoidSupport" ) ) ;
582582 return result ;
583583 }
584584 catch
@@ -630,7 +630,7 @@ public virtual ProcessPaymentResult ProcessRecurringPayment(ProcessPaymentReques
630630 catch ( NotSupportedException )
631631 {
632632 var result = new ProcessPaymentResult ( ) ;
633- result . AddError ( _commonServices . Localization . GetResource ( "Common.Payment.NoRecurringPaymentSupport" ) ) ;
633+ result . AddError ( _services . Localization . GetResource ( "Common.Payment.NoRecurringPaymentSupport" ) ) ;
634634 return result ;
635635 }
636636 catch
@@ -661,7 +661,7 @@ public virtual CancelRecurringPaymentResult CancelRecurringPayment(CancelRecurri
661661 catch ( NotSupportedException )
662662 {
663663 var result = new CancelRecurringPaymentResult ( ) ;
664- result . AddError ( _commonServices . Localization . GetResource ( "Common.Payment.NoRecurringPaymentSupport" ) ) ;
664+ result . AddError ( _services . Localization . GetResource ( "Common.Payment.NoRecurringPaymentSupport" ) ) ;
665665 return result ;
666666 }
667667 catch
0 commit comments