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

Refund_PayPalTransaction() private method

private Refund_PayPalTransaction ( ) : void
return void
        public void Refund_PayPalTransaction()
        {
            string nonce = TestHelper.GenerateFuturePaymentPayPalNonce(gateway);
            TransactionRequest request = new TransactionRequest
            {
                Amount = SandboxValues.TransactionAmount.AUTHORIZE,
                PaymentMethodNonce = nonce,
                Options = new TransactionOptionsRequest
                {
                    SubmitForSettlement = true
                }
            };
            Result<Transaction> result = gateway.Transaction.Sale(request);
            Assert.IsTrue(result.IsSuccess());
            var id = result.Target.Id;

            Result<Transaction> refundResult = gateway.Transaction.Refund(id);
            Assert.IsTrue(refundResult.IsSuccess());
        }
TransactionIntegrationTest