Beispiel #1
0
        private void SetupCredential <T>(IPayPalCloneable <T> operation, ref T operationToUse)
            where T : PaypalOperation
        {
            // If API credential is not filled, then create a credential from the configuration file.
            if (operationToUse.Credential == null)
            {
                if (operationToUse != operation)
                {
                    operationToUse = operation.Clone();
                }

                SetupCredential(operationToUse);
            }
        }
Beispiel #2
0
        private void SetupDefaultCurrencyCode <T>(IPayPalCloneable <T> operation, ref T operationToUse)
            where T : PayPalExpressCheckoutOperation
        {
            // If API DefaultCurrency is not filled, then get the DefaultCurrency from the configuration file.
            if (operationToUse.DefaultCurrencyCode == CurrencyCode.Undefined)
            {
                if (operationToUse != operation)
                {
                    operationToUse = operation.Clone();
                }

                SetupDefaultCurrencyCode <T>(operationToUse);
            }
        }