From 1a8f7a73b61f79259ef9fe66dea8f3d946ee43ba Mon Sep 17 00:00:00 2001 From: ben & joshuaknox Date: Wed, 15 May 2013 13:32:53 -0700 Subject: [PATCH] data #228 - Customers can no longer be created with a device session id. --- src/main/java/com/braintreegateway/CustomerRequest.java | 1 - .../com/braintreegateway/integrationtest/CustomerIT.java | 8 +++++++- .../integrationtest/CustomerRequestIT.java | 8 ++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/braintreegateway/CustomerRequest.java b/src/main/java/com/braintreegateway/CustomerRequest.java index c6ae3ca9..47504a9a 100644 --- a/src/main/java/com/braintreegateway/CustomerRequest.java +++ b/src/main/java/com/braintreegateway/CustomerRequest.java @@ -128,7 +128,6 @@ public String toQueryString(String root) { protected RequestBuilder buildRequest(String root) { RequestBuilder builder = new RequestBuilder(root). addElement("company", company). - addElement("deviceSessionId", deviceSessionId). addElement("email", email). addElement("fax", fax). addElement("firstName", firstName). diff --git a/src/test/java/com/braintreegateway/integrationtest/CustomerIT.java b/src/test/java/com/braintreegateway/integrationtest/CustomerIT.java index 2838e404..4655e510 100644 --- a/src/test/java/com/braintreegateway/integrationtest/CustomerIT.java +++ b/src/test/java/com/braintreegateway/integrationtest/CustomerIT.java @@ -118,7 +118,13 @@ public void createWithBlanks() { @Test public void createWithSecurityParams() { CustomerRequest request = new CustomerRequest(). - deviceSessionId("abc123"); + creditCard(). + cardholderName("Fred Jones"). + number("5105105105105100"). + cvv("123"). + expirationDate("05/12"). + deviceSessionId("abc123"). + done(); Result result = gateway.customer().create(request); assertTrue(result.isSuccess()); diff --git a/src/test/java/com/braintreegateway/integrationtest/CustomerRequestIT.java b/src/test/java/com/braintreegateway/integrationtest/CustomerRequestIT.java index 92b8c43d..4bc41a49 100644 --- a/src/test/java/com/braintreegateway/integrationtest/CustomerRequestIT.java +++ b/src/test/java/com/braintreegateway/integrationtest/CustomerRequestIT.java @@ -9,7 +9,11 @@ public class CustomerRequestIT { @Test public void toXmlIncludesSecurityParams() { - CustomerRequest request = new CustomerRequest().deviceSessionId("device_session"); - TestHelper.assertIncludes("device_session", request.toXML()); + CustomerRequest request = new CustomerRequest(). + creditCard(). + deviceSessionId("devicesession123"). + done(); + + TestHelper.assertIncludes("devicesession123", request.toXML()); } }