Braintree.Tests.Integration.TransactionIntegrationTest.Sale_WithServiceFeeWithTooLargeAmount C# (CSharp) Method

Sale_WithServiceFeeWithTooLargeAmount() private method

private Sale_WithServiceFeeWithTooLargeAmount ( ) : void
return void
        public void Sale_WithServiceFeeWithTooLargeAmount()
        {
            TransactionRequest request = new TransactionRequest
            {
                Amount = 1M,
                MerchantAccountId = MerchantAccountIDs.NON_DEFAULT_SUB_MERCHANT_ACCOUNT_ID,
                CreditCard = new TransactionCreditCardRequest
                {
                    Number = SandboxValues.CreditCardNumber.VISA,
                    ExpirationDate = "05/2009",
                },
                ServiceFeeAmount = 2M
            };

            Result<Transaction> result = gateway.Transaction.Sale(request);
            Assert.IsFalse(result.IsSuccess());
            Assert.AreEqual(ValidationErrorCode.TRANSACTION_SERVICE_FEE_AMOUNT_IS_TOO_LARGE, result.Errors.ForObject("Transaction").OnField("ServiceFeeAmount")[0].Code);
        }
TransactionIntegrationTest