question

alvinato avatar image
alvinato asked alvinato commented

ActivityNotFound exception with ACTION_SECURE_CARD_DATA

I'm having issues with ACTIONSECURECARD_DATA action.

I call it with this code here:

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);
    startActivity(intent);

and receive this error message:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=clover.intent.action.START_SECURE_CARD_DATA (has extras) }

Things I've tried to fix this: 1.) use the full intent name instead of the variable: "clover.intent.action.STARTSECUREPAYMENT"

2.) upgrade my sdk version from 86 to 186 in the gradle dependancies within android studio. With this line: compile 'com.clover.sdk:clover-android-sdk:168' then after failing, this line: compile 'com.clover.sdk:clover-android-sdk:latest.release'

I'm at a loss as to what else to try here. I've used ACTIONSECUREPAY, ACTIONCLOVERPAY and other intents provided through the android examples with no issues.

NOTE: - ACTIONSECUREBALANCECHECK outputs the same error as ACTIONSECURECARDDATA.
- I am using the genymotion emulated environment.

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

Dan avatar image
Dan answered alvinato commented

I think you need com.clover.payment.executor.secure installed on the device. The secure payments app requires Mini/Mobile/Flex, but you can try installing it on your emulator (I'm not familiar with the app/haven't tried before, it certainly wont fully function, but you may get enough functionality to test that it is picking up your intent).

From Intents.java:

/**
 * Launch activity to securely capture card data on Mobile or Mini (Requires that your app has "clover.permission.ACTION_PAY" in its AndroidManifest.xml file)
 * <p>
 * Extras passed:
 * <ul>
 * <li>{@link #EXTRA_TRANSACTION_TYPE} - must be set to {@link #TRANSACTION_TYPE_CARD_DATA} (Required)</li>
 * <li>{@link #EXTRA_CARD_DATA_MESSAGE} - written explanation shown on card entry screen</li>
 * <li>{@link #EXTRA_CARD_ENTRY_METHODS} - allowed payment types, default all allowed</li>
 * </ul>
 * <p>
 * Result data includes:
 * <ul>
 * <li>{@link #EXTRA_CARD_DATA} - captured card data</li>
 * </ul>
 * <p>
 * Result codes:
 * <ul>
 *     <li>{@link android.app.Activity#RESULT_OK} - card data captured successfully</li>
 *     <li>{@link android.app.Activity#RESULT_CANCELED} - card data not captured successfully (Cancel button)</li>
 * </ul>
 */
 public static final String ACTION_SECURE_CARD_DATA = "clover.intent.action.START_SECURE_CARD_DATA";
1 comment
10 |2000

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

alvinato avatar image alvinato commented ·

Thanks for your response - I've since loaded my application onto a clover device and the intent has been found.

0 Likes 0 ·

Welcome to the
Clover Developer Community