0
Colleagues, please, I need to receive the return variable from this encryption library below. My application is in Flutter Web, and I don’t know how to include Javascript in Flutter Web. I’ve done a lot of research, but I really haven’t got any results
The Library of Cryptography:
<script type="text/javascript" src="https://sandbox.boletobancario.com/boletofacil/wro/direct-checkout.min.js"></script>
Getting the hash:
In this step you will need to inform the card data to our library, which will validate card data, encrypt it and return a hash.
Below is an example of our library’s use of how to get the credit card hash:
<script type="text/javascript">
var checkout = new DirectCheckout('PUBLIC_TOKEN', false);
function generateHash() {
var cardData = {
cardNumber: '1111 2222 3333 4444',
holderName: 'Nome do Titular',
securityCode: '123',
expirationMonth: '12',
expirationYear: '2025'
};
}
checkout.getCardHash(cardData, function(cardHash) {
/* Sucesso - A variável cardHash conterá o hash do cartão */
}, function(error) {
/* Erro - A variável error conterá o erro ocorrido ao obter o hash */
});
</script>
I don’t know if you have that possibility, and if you do, it’s probably not the best option. Search for a direct access to the service, API (https://juno.com.br/api/). Also check: https://github.com/tamojuno/direct-checkout-flutter
– rubStackOverflow
rubStackOverflow, thank you for your collaboration, but from what I saw in the Juno documentation, this has no API, and the direct-checkout-flutter SDK does not work with Flutter Web, only android and Ios. I’ve asked for support at Juno, but I haven’t heard back
– Tatiana Golin
Um. I didn’t realize it was Flutter Web
– rubStackOverflow