I'm new to the Android+Braintree world. At the moment I'm using the Drop-In interface. What I want to do is the following
"If the user is creating/adding a new card, ask him if he wants to save credit card information".
I need this info because later I will set the storeInVaultOnSuccess
option in the transaction's params accordingly.
Now, it seems that there is no way to insert an element in the drop-in GUI to understand if the user wants to save these data or not.
Fine, so I'm going to add an additional step just after the drop-in interface in which I'm only going to ask the user if he wants to save the credit card data or not.
But the problem is that I don't want to ask this question if he choose an already existent credit card, so I need to know if he created a new card or if he selected an existent one.
Is there a way to perform this task (or is there a better alternative)?
WHAT I'VE ALREADY TRIED:
I've tried to see all the information given in the onActivityResult
method, more specifically the content of the Intent given as the 3rd parameter.
What I have is, of course, the EXTRA_PAYMENT_METHOD_NONCE
, and then the EXTRA_PAYMENT_METHOD
(type com.braintreepayments.api.models.Card
), but looking at the code of Card.java
I'm not able to understand how to retrieve (if possible) this kind of information.
Thanks in advance.