Skip to content

Commit

Permalink
data #228 - Customers can no longer be created with a device session id.
Browse files Browse the repository at this point in the history
  • Loading branch information
braintreeps committed May 15, 2013
1 parent f5db2e6 commit 1a8f7a7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/main/java/com/braintreegateway/CustomerRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Customer> result = gateway.customer().create(request);

assertTrue(result.isSuccess());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 1a8f7a7

Please sign in to comment.