Exemplo n.º 1
0
		/// <summary>
		/// Create a dictionary with credentials for PayPal service.
		/// </summary>
		/// <param name="settings"></param>
		/// <returns></returns>
		private static Dictionary<string, string> CreatePayPalApiConfig(PayPalProcessorSettings settings)
		{
			return new Dictionary<string, string>
					{
						{"mode", GetModeString(settings.LiveMode)},
						{"account1.apiUsername", settings.ApiUsername},
						{"account1.apiPassword", settings.ApiPassword},
						{"account1.apiSignature", settings.ApiSignature}
					};
		}
Exemplo n.º 2
0
		/// <summary>
		/// Saves the processor settings to an extended data collection
		/// </summary>
		/// <param name="extendedData">The <see cref="ExtendedDataCollection"/></param>
		/// <param name="processorSettings">The <see cref="PayPalProcessorSettings"/> to be serialized and saved</param>
		public static void SaveProcessorSettings(this ExtendedDataCollection extendedData, PayPalProcessorSettings processorSettings)
		{
			var settingsJson = JsonConvert.SerializeObject(processorSettings);

			extendedData.SetValue(Constants.ExtendedDataKeys.ProcessorSettings, settingsJson);
		}
Exemplo n.º 3
0
		public PayPalPaymentProcessor(PayPalProcessorSettings settings)
        {
            _settings = settings;
        }
Exemplo n.º 4
0
 public PayPalPaymentProcessor(PayPalProcessorSettings settings)
 {
     _settings = settings;
     System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
 }