I'm trying to add Kount Fraud protection to an existing BrainTree Drop In installation and according to the docs I should just be able to provide a data collector to start the flow:
braintree.dropin.create({
authorization: clientToken,
container: '#dropin-container',
// add the data collector for Kount
dataCollector: {
kount: true
},
card: {
amount: amount,
currency: "USD"
}
},
function(createErr, instance) {
button.on("click", function() {
instance.requestPaymentMethod(function (err, payload) {
// payload.deviceData is 'undefined'
});
});
});
The problem is that `payload.deviceData is always undefined.
The docs are not really clear what dependencies are required for the drop in component. It shows the scripts for the client component but not the drop in.
I'm using:
<!-- <script src="https://js.braintreegateway.com/web/3.57.0/js/client.min.js"></script> -->
<script src="https://js.braintreegateway.com/web/dropin/1.22.0/js/dropin.min.js"></script>
<script src="https://js.braintreegateway.com/web/3.57.0/js/data-collector.min.js"></script>
Is 1.22 the correct version to be using for the drop in? Is that the last version? I can't find an official way to check which versions should be used other than what's in the drop in docs which use 1.22?
Also tried adding the client.min.js
in (in addition to drop because without dropin the code above won't find the braintree.dropin.create
.
Any idea what's missing here?