Braintree.Tests.Integration.PaymentMethodNonceTest.Create_CreatesPaymentMethodNonce C# (CSharp) Метод

Create_CreatesPaymentMethodNonce() приватный Метод

private Create_CreatesPaymentMethodNonce ( ) : void
Результат void
        public void Create_CreatesPaymentMethodNonce()
        { 
            string nonce = TestHelper.GenerateUnlockedNonce(gateway);
            Result<Customer> customerResult = gateway.Customer.Create(new CustomerRequest());

            Result<PaymentMethod> paymentMethodResult = gateway.PaymentMethod.Create(new PaymentMethodRequest
            {
                CustomerId = customerResult.Target.Id,
                PaymentMethodNonce = nonce
            });

            Result<PaymentMethodNonce> result = gateway.PaymentMethodNonce.Create(paymentMethodResult.Target.Token);
            Assert.IsTrue(result.IsSuccess());
            Assert.IsNotNull(result.Target);
            Assert.IsNotNull(result.Target.Nonce);
        }