Accepting Loyalty and Bonus Cards
In addition to processing transactions with payment cards such as Visa and Mastercard, we also make it easy for you to read the card number (PAN) from magstripe-based Loyalty or Bonus Cards. Contact your account manager to determine if this feature will work with your specific loyalty or bonus card scheme. Currently only Miura card readers can read Loyalty or Bonus Cards.
In order to ensure the highest security standards, understand that you never will be able to read the PAN of a payment card. Instead, the BIN (i.e. the first six digits) of your loyalty or bonus card scheme must specifically be white-listed by us and never overlap with the BINs used by payment cards.
Reading a Magstripe Loyalty or Bonus Card
To read a magstripe loyalty or bonus card, create the activity via
createReadCardIntent
and check for
RESULT_CODE_READ_CARD_SUCCESS
in
onActivityResult
. After a successful swipe,
CardDetails
will contain the unencrypted
cardNumber
and raw
track1
,
track2
and
track3
data.
void readCard() { MposUi ui = MposUi.initialize(/* ... */); AccessoryParameters accessoryParameters = new AccessoryParameters.Builder(AccessoryFamily.MIURA_MPI) .bluetooth() .build(); ui.getConfiguration().setTerminalParameters(accessoryParameters); Intent intent = MposUi.getInitializedInstance().createReadCardIntent(); startActivityForResult(intent, MposUi.REQUEST_CODE_READ_CARD); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == MposUi.REQUEST_CODE_READ_CARD) { if (resultCode == MposUi.RESULT_CODE_READ_CARD_SUCCESS) { CardDetails details = MposUi.getInitializedInstance().getCardDetails(); StringBuilder cardDetails = new StringBuilder(); if(details.getMaskedCardNumber() != null) { cardDetails.append("MaskedCardNumber: " + details.getMaskedCardNumber() + "\n"); } if(details.getCardNumber() != null) { cardDetails.append("CardNumber: " + details.getCardNumber() + "\n"); } if(details.getTrack1() != null) { cardDetails.append("Track1: " + details.getTrack1() + "\n"); } if(details.getTrack2() != null) { cardDetails.append("Track2: " + details.getTrack2() + "\n"); } if(details.getTrack3() != null) { cardDetails.append("Track3: " + details.getTrack3() + "\n"); } Toast.makeText(this, cardDetails.toString(), Toast.LENGTH_LONG).show(); } } }