File tree Expand file tree Collapse file tree 4 files changed +29
-2
lines changed
Nop.Plugin.Payments.PayPalDirect
Nop.Plugin.Payments.PayPalStandard Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 11Group: Payment methods
22FriendlyName: Credit Card
33SystemName: Payments.PayPalDirect
4- Version: 2.11
4+ Version: 2.12
55SupportedVersions: 3.90
66Author: nopCommerce team
77DisplayOrder: 1
Original file line number Diff line number Diff line change @@ -8,6 +8,17 @@ namespace Nop.Plugin.Payments.PayPalDirect
88 /// </summary>
99 public class PaypalHelper
1010 {
11+ #region Constants
12+
13+ /// <summary>
14+ /// nopCommerce partner code
15+ /// </summary>
16+ private const string BN_CODE = "nopCommerce_SP" ;
17+
18+ #endregion
19+
20+ #region Methods
21+
1122 /// <summary>
1223 /// Get PayPal Api context
1324 /// </summary>
@@ -27,8 +38,14 @@ public static APIContext GetApiContext(PayPalDirectPaymentSettings payPalDirectP
2738 var accessToken = new OAuthTokenCredential ( config ) . GetAccessToken ( ) ;
2839 var apiContext = new APIContext ( accessToken ) { Config = config } ;
2940
41+ if ( apiContext . HTTPHeaders == null )
42+ apiContext . HTTPHeaders = new Dictionary < string , string > ( ) ;
43+ apiContext . HTTPHeaders [ "PayPal-Partner-Attribution-Id" ] = BN_CODE ;
44+
3045 return apiContext ;
3146 }
47+
48+ #endregion
3249 }
3350}
3451
Original file line number Diff line number Diff line change 11Group: Payment methods
22FriendlyName: PayPal Standard
33SystemName: Payments.PayPalStandard
4- Version: 1.31
4+ Version: 1.32
55SupportedVersions: 3.90
66Author: nopCommerce team
77DisplayOrder: 1
Original file line number Diff line number Diff line change @@ -27,6 +27,15 @@ namespace Nop.Plugin.Payments.PayPalStandard
2727 /// </summary>
2828 public class PayPalStandardPaymentProcessor : BasePlugin , IPaymentMethod
2929 {
30+ #region Constants
31+
32+ /// <summary>
33+ /// nopCommerce partner code
34+ /// </summary>
35+ private const string BN_CODE = "nopCommerce_SP" ;
36+
37+ #endregion
38+
3039 #region Fields
3140
3241 private readonly CurrencySettings _currencySettings ;
@@ -286,6 +295,7 @@ private string GenerationRedirectionUrl(PostProcessPaymentRequest postProcessPay
286295
287296 builder . AppendFormat ( "&custom={0}" , postProcessPaymentRequest . Order . OrderGuid ) ;
288297 builder . AppendFormat ( "&charset={0}" , "utf-8" ) ;
298+ builder . AppendFormat ( "&bn={0}" , BN_CODE ) ;
289299 builder . Append ( string . Format ( "&no_note=1¤cy_code={0}" , HttpUtility . UrlEncode ( _currencyService . GetCurrencyById ( _currencySettings . PrimaryStoreCurrencyId ) . CurrencyCode ) ) ) ;
290300 builder . AppendFormat ( "&invoice={0}" , postProcessPaymentRequest . Order . Id ) ;
291301 builder . AppendFormat ( "&rm=2" , new object [ 0 ] ) ;
You can’t perform that action at this time.
0 commit comments