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.
Stripe`s default payment card is as said 4242 4242 4242 4242 with a not passed date as expiry and 3 random numbers as CVV. F.ex i could fill 4242 4242 4242 4242 as card number, and 09/21 as expiry and 123 as CVV.
But, What may be your problem is that Stripe is currently not publicly available in India as it is in invite only at the moment. Check https://stripe.com/global
Short Answer: 4000003560000008
For more numbers or other details check https://stripe.com/docs/testing#international-cards
Note: High chances to oversee the tabs on the section top, limiting to this question, you may want to check for " Asia-Pacific " tab
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.