Open joaovictortinoco opened 7 years ago
@joaovictortinoco adding Security.addProvider(BouncyCastleProvider())
before creditCard.encrypt()
worked for me.
I'm also getting this problem. I've tried to use @joaovictortinoco's sugestion, but what is BouncyCastleProvider()?
I am also getting this Problem Added this line Security.addProvider(BouncyCastleProvider()) Still problem didn't resolved please help us.
@PrinceBE
Security.addProvider(new BouncyCastleProvider());
should do the trick. Are you getting the same exception?
@micaelomota
BouncyCastleProvider() is an instance of the bouncy castle library that allows the encryptor
to proper cryptography the credit card data.
Yes i am getting same exception @caueferreira
Any one here to help? @caueferreira
Its been a week and since no reply from your side. A bad support from your team.
I've just created a simple application. @PrinceBE did you added the BouncyCastleProvider()
within the same activity you call encrypt()
method?
Yes I added below snippet to encrypt the card CreditCard creditCard = new CreditCard(); creditCard.setCvc(cvc.getText().toString()); creditCard.setNumber(cardNumber.getText().toString()); creditCard.setExpirationMonth(String.valueOf(month)); creditCard.setExpirationYear(String.valueOf(year)); creditCard.setPublicKey(MOIP_PUBLIC_KEY); try { String encryptedKey = creditCard.encrypt(); } catch (MoipEncryptionException e) { e.printStackTrace(); }
Added this line in activity's Oncreate: Security.addProvider(new BouncyCastleProvider());
That's weird... Which android sdk version are you compiling? I can't recreate this error.
compileSdkVersion 26 buildToolsVersion "26.0.1"
Any update from you side??
I've just added a working app. Could you see if it works for you? If so, I'll merge it afterwards. https://github.com/moip/moip-encryption-sdk-android/tree/add-simple-app
Hello! I've followed the guidelines of the MOIP integration but during the encryption process i got this log: