Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Re-add card brand in Android Converter class #817

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.stripe.android.model.BankAccount;
import com.stripe.android.model.BankAccountTokenParams;
import com.stripe.android.model.Card;
import com.stripe.android.model.CardBrand;
import com.stripe.android.model.PaymentIntent;
import com.stripe.android.model.PaymentMethod;
import com.stripe.android.model.SetupIntent;
Expand Down Expand Up @@ -85,6 +86,8 @@ private static WritableMap convertCardToWritableMap(final Card card) {

if (card == null) return result;

CardBrand brand = card.getBrand();

result.putString("cardId", card.getId());
result.putString("number", card.getNumber());
result.putString("cvc", card.getCvc() );
Expand All @@ -97,6 +100,7 @@ private static WritableMap convertCardToWritableMap(final Card card) {
result.putString("addressState", card.getAddressState() );
result.putString("addressZip", card.getAddressZip() );
result.putString("addressCountry", card.getAddressCountry() );
result.putString("brand", String.valueOf(brand) );
result.putString("last4", card.getLast4() );
result.putString("fingerprint", card.getFingerprint() );
result.putString("country", card.getCountry() );
Expand Down