I am using braintree rails dropin and only my first transaction was successfully reflected in the sandbox admin. I noticed that the client token being generated on the controller is the same every time its called. Is this an error or is it supposed to generate the same token every time. I didn't see anything in the documentation regarding this issue.
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
The client token is unique for each call to the Braintree API. Without code or sample tokens being generated there's no way to confirm or resolve this issue. But I suspect that's not truly happening. I suspect what you might be seeing is that it's almost entirely the same. You can test this in
irb
:The client token is a blob of data that, as the documentation says, contains all authorization and configuration information your client needs to initialize the client SDK to communicate with Braintree. Under the hood, you can see that current client tokens are base-64 encoded data types with a string of Json inside. It's easy to see that they are unique if you see the
authorizationFingerprint
:If you don't see different
authorizationFingerprints
, I would contact Braintree Support immediately.