I want to use user "device_data"
with braintree js client, but the the data not passed and $_POST['device_data']
is valid method!
I try this on sandbox! does it differ on production environment?
here are my codes!
<div style="max-width:300px; margin:20px auto;">
<form id="checkout" method="post" action="patch/to/checkout">
<div id="payment-form"></div>
<input type="submit" value="Pay" />
</form>
</div>
<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
<script>
var clientToken = "clientTokenFromPHP";
braintree.setup(clientToken, "dropin", {
dataCollector: {
kount: {environment: 'sandbox'},
paypal: true
},
onReady: function (braintreeInstance) {
braintreeInstance.deviceData;
},
container: "payment-form",
});
</script>
i try to echo the $_POST['device_data']
on checkout page but it was undefined!
how can i fix this?