question

tellymasse avatar image
tellymasse asked sam Deactivated answered

Loyalty card swipe

We have a customer who wants to have his patrons swipe their casino loyalty cards on the clover so they can identify them and then swipe their credit card for payment. Is there a way to have the loyalty card data returned to us via the API? Thank you

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

sam avatar image
sam Deactivated answered

You can start the Clover Secure Payment app to capture card data and have it returned to your app. Start the Secure Payment activity for result using the ACTIONSECURECARD_DATA action in /sdk/v1/intents.java.

final Intent intent = new Intent(Intents.ACTION_SECURE_CARD_DATA);
intent.putExtra(Intents.EXTRA_CARD_ENTRY_METHODS, Intents.CARD_ENTRY_METHOD_MAG_STRIPE);
intent.putExtra(Intents.EXTRA_TRANSACTION_TYPE, Intents.TRANSACTION_TYPE_CARD_DATA);
startActivityForResult(intent, REQUEST_PAY);'

If the card is swiped and read successfully, you will get an activity result RESULT_OK with the card data as extras.

  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == REQUEST_PAY) {
      if (resultCode == RESULT_OK) {
        PaymentRequestCardDetails details = data.getParcelableExtra(Intents.EXTRA_CARD_DATA);
      }
    }
  }

https://devask.clover.com/question/3/...

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community