public void Copy(PayPalExpressPaymentSettings settings, bool fromSettings)
        {
            if (fromSettings)
            {
                UseSandbox = settings.UseSandbox;
                TransactMode = Convert.ToInt32(settings.TransactMode);
                ApiAccountName = settings.ApiAccountName;
                ApiAccountPassword = settings.ApiAccountPassword;
                Signature = settings.Signature;
                AdditionalFee = settings.AdditionalFee;
                AdditionalFeePercentage = settings.AdditionalFeePercentage;
                DisplayCheckoutButton = settings.DisplayCheckoutButton;
                ConfirmedShipment = settings.ConfirmedShipment;
                NoShipmentAddress = settings.NoShipmentAddress;
                CallbackTimeout = settings.CallbackTimeout;
                DefaultShippingPrice = settings.DefaultShippingPrice;
            }
            else
			{
                settings.UseSandbox = UseSandbox;
                settings.TransactMode = (TransactMode)TransactMode;
                settings.ApiAccountName = ApiAccountName;
                settings.ApiAccountPassword = ApiAccountPassword;
                settings.Signature = Signature;
                settings.AdditionalFee = AdditionalFee;
                settings.AdditionalFeePercentage = AdditionalFeePercentage;
                settings.DisplayCheckoutButton = DisplayCheckoutButton;
                settings.ConfirmedShipment = ConfirmedShipment;
                settings.NoShipmentAddress = NoShipmentAddress;
                settings.CallbackTimeout = CallbackTimeout;
                settings.DefaultShippingPrice = DefaultShippingPrice;
            }
        }
 public static PaymentActionCodeType GetPaymentAction(PayPalExpressPaymentSettings payPalExpressPaymentSettings)
 {
     if (payPalExpressPaymentSettings.TransactMode == TransactMode.Authorize)
     {
         return PaymentActionCodeType.Authorization;
     }
     else
     {
         return PaymentActionCodeType.Sale;
     }
 }