I'm using stripe payment integration with my android app, but when I test the card it gives invalid card message means the card is null. stripe gives these international cards in which India is not mentioned. how I test card in India.
I tried various cards including 4242 4242 4242 4242 and also others. stripe testing cards
https://stripe.com/docs/testing#international-cards
final Card cardToSave = mCardMultilineWidget.getCard();
if (cardToSave == null) {
// mErrorDialogHandler.showError("Invalid Card Data");
Toast.makeText(getContext(),"Invalid Card Data",Toast.LENGTH_LONG).show();
return ;
}
else {
Toast.makeText(getContext(),"valid Card Data",Toast.LENGTH_LONG).show();
stripe.createToken(
cardToSave,
new TokenCallback() {
public void onSuccess(Token token) {
//Send token to your own web service
Toast.makeText(getContext(),token +"",Toast.LENGTH_LONG).show();
}
public void onError(Exception error) {
Toast.makeText(getContext(),
error.getLocalizedMessage(),
Toast.LENGTH_LONG).show();
}
}
);
}
I want that card is valid and token return by stripe.
4242 4242 4242 4242
card? – Vladyslav Matviienko May 10 '19 at 7:31