1515using SmartStore . Core . Infrastructure ;
1616using SmartStore . PayPal . PayPalSvc ;
1717using SmartStore . PayPal . Settings ;
18- using SmartStore . PayPal . Extensions ;
1918using SmartStore . Services ;
2019using SmartStore . Services . Catalog ;
2120using SmartStore . Services . Common ;
@@ -94,7 +93,7 @@ public PayPalExpressApiService(
9493
9594 public ProcessPaymentResult ProcessPayment ( ProcessPaymentRequest request )
9695 {
97- var settings = _settingService . LoadPayPalExpressSettings ( "PayPalExpress" , _services . StoreContext . CurrentStore . Id ) ;
96+ var settings = _settingService . LoadSetting < PayPalExpressSettings > ( _services . StoreContext . CurrentStore . Id ) ;
9897 var doPayment = DoExpressCheckoutPayment ( request ) ;
9998 var result = new ProcessPaymentResult ( ) ;
10099
@@ -128,7 +127,7 @@ public void PostProcessPayment(PostProcessPaymentRequest request)
128127 public CapturePaymentResult Capture ( CapturePaymentRequest request )
129128 {
130129 var result = new CapturePaymentResult ( ) ;
131- var settings = _settingService . LoadPayPalExpressSettings ( "PayPalExpress" , _services . StoreContext . CurrentStore . Id ) ;
130+ var settings = _settingService . LoadSetting < PayPalExpressSettings > ( _services . StoreContext . CurrentStore . Id ) ;
132131
133132 string authorizationId = request . Order . AuthorizationTransactionId ;
134133 var req = new DoCaptureReq ( ) ;
@@ -171,7 +170,7 @@ public CapturePaymentResult Capture(CapturePaymentRequest request)
171170
172171 public VoidPaymentResult Void ( VoidPaymentRequest request )
173172 {
174- var settings = _settingService . LoadPayPalExpressSettings ( "PayPalExpress" , _services . StoreContext . CurrentStore . Id ) ;
173+ var settings = _settingService . LoadSetting < PayPalExpressSettings > ( _services . StoreContext . CurrentStore . Id ) ;
175174 var result = new VoidPaymentResult ( ) ;
176175
177176 string transactionId = request . Order . AuthorizationTransactionId ;
@@ -216,7 +215,7 @@ public RefundPaymentResult Refund(RefundPaymentRequest request)
216215 {
217216
218217 var result = new RefundPaymentResult ( ) ;
219- var settings = _settingService . LoadPayPalExpressSettings ( "PayPalExpress" , _services . StoreContext . CurrentStore . Id ) ;
218+ var settings = _settingService . LoadSetting < PayPalExpressSettings > ( _services . StoreContext . CurrentStore . Id ) ;
220219
221220 string transactionId = request . Order . CaptureTransactionId ;
222221
@@ -261,7 +260,7 @@ public CancelRecurringPaymentResult CancelRecurringPayment(CancelRecurringPaymen
261260 {
262261
263262 var result = new CancelRecurringPaymentResult ( ) ;
264- var settings = _settingService . LoadPayPalExpressSettings ( "PayPalExpress" , _services . StoreContext . CurrentStore . Id ) ;
263+ var settings = _settingService . LoadSetting < PayPalExpressSettings > ( _services . StoreContext . CurrentStore . Id ) ;
265264 var order = request . Order ;
266265
267266 var req = new ManageRecurringPaymentsProfileStatusReq ( ) ;
@@ -302,7 +301,7 @@ public SetExpressCheckoutResponseType SetExpressCheckout(PayPalProcessPaymentReq
302301 {
303302 var result = new SetExpressCheckoutResponseType ( ) ;
304303 var currentStore = _storeContext . CurrentStore ;
305- var settings = _settingService . LoadPayPalExpressSettings ( "PayPalExpress" , _services . StoreContext . CurrentStore . Id ) ;
304+ var settings = _settingService . LoadSetting < PayPalExpressSettings > ( _services . StoreContext . CurrentStore . Id ) ;
306305
307306 var req = new SetExpressCheckoutReq
308307 {
@@ -465,7 +464,7 @@ public SetExpressCheckoutResponseType SetExpressCheckout(PayPalProcessPaymentReq
465464 currencyID = PayPalHelper . GetPaypalCurrency ( _currencyService . GetCurrencyById ( _currencySettings . PrimaryStoreCurrencyId ) )
466465 } ,
467466 Custom = processPaymentRequest . OrderGuid . ToString ( ) ,
468- ButtonSource = "SmartStore.NET" ,
467+ ButtonSource = SmartStoreVersion . CurrentFullVersion ,
469468 PaymentAction = PayPalHelper . GetPaymentAction ( settings ) ,
470469 PaymentDetailsItem = cartItems . ToArray ( )
471470 } ;
@@ -506,7 +505,7 @@ public SetExpressCheckoutResponseType SetExpressCheckout(PayPalProcessPaymentReq
506505 public GetExpressCheckoutDetailsResponseType GetExpressCheckoutDetails ( string token )
507506 {
508507 var result = new GetExpressCheckoutDetailsResponseType ( ) ;
509- var settings = _settingService . LoadPayPalExpressSettings ( "PayPalExpress" , _services . StoreContext . CurrentStore . Id ) ;
508+ var settings = _settingService . LoadSetting < PayPalExpressSettings > ( _services . StoreContext . CurrentStore . Id ) ;
510509
511510 using ( var service = new PayPalAPIAASoapBinding ( ) )
512511 {
@@ -537,7 +536,7 @@ public GetExpressCheckoutDetailsResponseType GetExpressCheckoutDetails(string to
537536
538537 public ProcessPaymentRequest SetCheckoutDetails ( ProcessPaymentRequest processPaymentRequest , GetExpressCheckoutDetailsResponseDetailsType checkoutDetails )
539538 {
540- var settings = _settingService . LoadPayPalExpressSettings ( "PayPalExpress" , _services . StoreContext . CurrentStore . Id ) ;
539+ var settings = _settingService . LoadSetting < PayPalExpressSettings > ( _services . StoreContext . CurrentStore . Id ) ;
541540 int customerId = Convert . ToInt32 ( _workContext . CurrentCustomer . Id . ToString ( ) ) ;
542541 var customer = _customerService . GetCustomerById ( customerId ) ;
543542
@@ -697,7 +696,7 @@ public ProcessPaymentRequest SetCheckoutDetails(ProcessPaymentRequest processPay
697696 /// <returns>Result</returns>
698697 public bool VerifyIPN ( string formString , out Dictionary < string , string > values )
699698 {
700- var settings = _settingService . LoadPayPalExpressSettings ( "PayPalExpress" , _services . StoreContext . CurrentStore . Id ) ;
699+ var settings = _settingService . LoadSetting < PayPalExpressSettings > ( _services . StoreContext . CurrentStore . Id ) ;
701700 var req = ( HttpWebRequest ) WebRequest . Create ( PayPalHelper . GetPaypalUrl ( settings ) ) ;
702701 req . Method = "POST" ;
703702 req . ContentType = "application/x-www-form-urlencoded" ;
@@ -733,7 +732,7 @@ public bool VerifyIPN(string formString, out Dictionary<string, string> values)
733732 public DoExpressCheckoutPaymentResponseType DoExpressCheckoutPayment ( ProcessPaymentRequest processPaymentRequest )
734733 {
735734 var result = new DoExpressCheckoutPaymentResponseType ( ) ;
736- var settings = _settingService . LoadPayPalExpressSettings ( "PayPalExpress" , _services . StoreContext . CurrentStore . Id ) ;
735+ var settings = _settingService . LoadSetting < PayPalExpressSettings > ( _services . StoreContext . CurrentStore . Id ) ;
737736
738737 // populate payment details
739738 var paymentDetails = new PaymentDetailsType
@@ -744,7 +743,7 @@ public DoExpressCheckoutPaymentResponseType DoExpressCheckoutPayment(ProcessPaym
744743 currencyID = PayPalHelper . GetPaypalCurrency ( _currencyService . GetCurrencyById ( _currencySettings . PrimaryStoreCurrencyId ) )
745744 } ,
746745 Custom = processPaymentRequest . OrderGuid . ToString ( ) ,
747- ButtonSource = "SmartStore.NET"
746+ ButtonSource = SmartStoreVersion . CurrentFullVersion
748747 } ;
749748
750749 // build the request
0 commit comments