CustomerRequest missing riskDataCustomerRequest element on XML generation
See original GitHub issueGeneral information
- SDK/Library version: 3.1.0
- Environment: Doesn’t matter
- Language, language version, and OS: Java
Issue description
CustomerRequest https://github.com/braintree/braintree_java/blob/master/src/main/java/com/braintreegateway/CustomerRequest.java#L156
The method buildRequest
does not add the element RiskDataCustomerRequest even though is it part of the Customer Request.
Test Case
CustomerRequest customerRequest = new CustomerRequest();
customerRequest.riskData().customerBrowser(USER_AGENT);
customerRequest.riskData().customerIP(REMOTE_IP);
customerRequest.customField("test_field", "test123);
System.out.println(customerRequest.toXML());
will output
<customer>
<customFields>
<test_field>test123</test_field>
</customFields>
</customer>
I think all that is required is to add the missing addElement statement. i.e.
addElement("riskDataCustomerRequest", riskDataCustomerRequest).
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
Handling XMLs with "Missing" or "Asymmetric" Elements
When you set up a QuerySurge connection using the XML driver and query an "Asymmetric" XML document, you'll expect to see nulls in...
Read more >xml element not generating in data control if field value is null
Hi All, I am facing issue with request payload in BPEL. Senario is 1. There is one BPEL process which recieves input and...
Read more >Map XML elements to cells in an XML Map
To import and export XML data in Excel, an XML Map that associates XML elements with data in cells to get the results...
Read more >How to fix "Root element is missing." when doing a Visual ...
I was getting missing element error pointing to NuGet.Config file. At that time it was looking some thing like this <?xml version="1.0" encoding="utf-8"?> ......
Read more >Error 'System.Xml - The root element is missing' inside ...
During the normal operation of Controller, the client software will regularly read/write to its cache files. During intensive operations (such ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Stexxen This issue has been fixed in version 3.2.0 of the SDK.
Oh, good catch. The endpoint accepts XML tags in both dash case and camel case. So it would be