Braintree.Tests.Integration.PaymentMethodIntegrationTest.Create_CreatesPayPalAccountWithFuturePaymentNonce C# (CSharp) Метод

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

private Create_CreatesPayPalAccountWithFuturePaymentNonce ( ) : void
Результат void
        public void Create_CreatesPayPalAccountWithFuturePaymentNonce()
        {
            Result<Customer> result = gateway.Customer.Create(new CustomerRequest());
            Assert.IsTrue(result.IsSuccess());

            string nonce = TestHelper.GenerateFuturePaymentPayPalNonce(gateway);
            var request = new PaymentMethodRequest
            {
                CustomerId = result.Target.Id,
                PaymentMethodNonce = nonce
            };
            Result<PaymentMethod> paymentMethodResult = gateway.PaymentMethod.Create(request);

            Assert.IsTrue(paymentMethodResult.IsSuccess());
            Assert.IsNotNull(paymentMethodResult.Target.Token);
            Assert.IsNotNull(paymentMethodResult.Target.ImageUrl);
            Assert.AreEqual(result.Target.Id, paymentMethodResult.Target.CustomerId);
            Assert.IsInstanceOf(typeof(PayPalAccount), paymentMethodResult.Target);
        }
        
PaymentMethodIntegrationTest