-2

The payment processor we are using supports all card types besides Discover for Android Pay. I have been looking all over the place to try and find a way to limit the card types that are supported. The only flags I could find that were somewhat relevant where on the MaskedWalletRequest. But they only allow you to deny debit cards or prepaid cards.

Anyone know of a way to limit the accepted card types?

Cherub
  • 11
  • 3
  • How would we know- we don't know what payment processor you're using or their API. – Gabe Sechan Sep 13 '16 at 15:17
  • The question is specific to the MaskedWalletRequest and limiting the allowed payment types. The specific payment processor is irrelevant. I'm simply asking how to limit the payment options that are displayed in the masked wallet to visa, mastercard, or amex. – Cherub Sep 13 '16 at 15:23

1 Answers1

1

I ended up finding the solution to my own question. I thought I would post the answer since I couldn't find it anywhere else. There is .addAllowedCardNetworks(supportedNetworks) method on the MaskedWalletRequest Builder.

If nothing is provided using the .addAllowedCardNetworks(supportedNetworks) or .addAllowedCardNetwork(cardNetwork) methods it will default to all card networks.

Collection<Integer> supportedNetworks = new ArrayList<Integer>();
supportedNetworks.add(WalletConstants.CardNetwork.AMEX);
supportedNetworks.add(WalletConstants.CardNetwork.MASTERCARD);
supportedNetworks.add(WalletConstants.CardNetwork.VISA);

MaskedWalletRequest maskedRequest = MaskedWalletRequest.newBuilder()
            .setMerchantName(BuildConfig.MERCHANT_NAME)
            .setPhoneNumberRequired(false)
            .setShippingAddressRequired(false)
            .setCurrencyCode("USD")
            .setEstimatedTotalPrice(String.format(Locale.US, "%s", total))
            .setCart(cart)
            .setPaymentMethodTokenizationParameters(parameters)
            .addAllowedCardNetworks(supportedNetworks)
            .build();
Cherub
  • 11
  • 3