Braintree.Tests.Integration.SubscriptionIntegrationTest.Create_WithPayPalAccount C# (CSharp) Метод

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

private Create_WithPayPalAccount ( ) : void
Результат void
        public void Create_WithPayPalAccount()
        {
            var customerRequest = new CustomerRequest
            {
                PaymentMethodNonce = Nonce.PayPalFuturePayment
            };
            var customer = gateway.Customer.Create(customerRequest).Target;

            TestPlan plan = PlanFixture.PLAN_WITHOUT_TRIAL;
            SubscriptionRequest request = new SubscriptionRequest
            {
                PaymentMethodToken = customer.PayPalAccounts[0].Token,
                PlanId = plan.Id,
            };

            Result<Subscription> result = gateway.Subscription.Create(request);
            Assert.IsTrue(result.IsSuccess());
            Assert.AreEqual(result.Target.PaymentMethodToken, customer.PayPalAccounts[0].Token);
        }
SubscriptionIntegrationTest