public NewCustomerResultSM CreateCustomer(NewPaymentCustomerSM newCust) { var request = new CustomerRequest { Phone = newCust.Phone, Id = newCust.CustomerId }; Result<Customer> result = _gateway.Customer.Create(request); var ret = new NewCustomerResultSM { IsSuccess = result.IsSuccess() }; if (ret.IsSuccess) { ret.NewBraintreeCustomerId = result.Target.Id; } return ret; }
public void CreateCustomer() { var sm = new NewPaymentCustomerSM { CustomerId = _testParentId.ToString(), Phone = "512-921-9530", LastName = "Smith" }; NewCustomerResultSM ret = _paymentManager.CreateCustomer(sm); Assert.IsTrue(ret.IsSuccess); Customer result = _paymentManager.FindCustomer(ret.NewBraintreeCustomerId); Assert.IsTrue(result != null); }