question

angelqm avatar image
angelqm asked Raymond Lee Deactivated answered

How can I obtain card information in Flex?

I'm trying to launch the payment screen to obtain card information from several resources. I've checked all the other post but non is referal to the Flex hardware. I'm doing the test right now in a virtual machine to at least trying to show the payments screen.

I'm trying to retrieve the information from several resources:
- NFC tag
- Magnetic Band
- EMV

My main intention is to just obtain the information in those cards cause they are going throw an specific payment proccess.

But the result is the screen doesn't change with the next code.

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, 1234);

This is the console output:

11-21 01:27:42.135 I/ActivityManager(  671): START u0 {act=clover.intent.action.START_SECURE_CARD_DATA cmp=com.clover.payment.executor.station/.StationPayActivity (has extras)} from uid 10093 on display 011-21 01:27:42.135 W/AudioTrack(  671): AUDIO_OUTPUT_FLAG_FAST denied by client11-21 01:27:42.135 V/WindowManager(  671): addAppToken: AppWindowToken{5cafc67 token=Token{3aec826 ActivityRecord{199d7f81 u0 com.clover.payment.executor.station/.StationPayActivity t406}}} to stack=1 task=406 at 211-21 01:27:42.156 I/StationPayActivity( 3594): finish(CommonActivity.java:1364): @2c621363 finish11-21 01:27:42.156 I/StationPayActivity( 3594): onCreate(CommonActivity.java:216): @2c621363 +onCreate: null11-21 01:27:42.158 I/StationPayActivity( 3594): onCreate(CommonActivity.java:256): @2c621363 -onCreate

Thank you in advance for your time and answers.
Payments
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

Raymond Lee avatar image
Raymond Lee Deactivated answered
If by virtual machine you mean you are emulating a Clover device, it is not possible to test the following on an emulator:
Card present payments
Receipt printing
Barcode scanning

For the above three, we recommend you purchase a Clover Developer Kit, so you can test how to obtain card information on an actual Clover device. See here on setting it up.

Since the emulator cannot do card present payments (due to lack of a card reader and secure board), that is why the StationPayActivity screen does not come up for the ACTION_SECURE_CARD_DATA intent, as there is no reason to when taking payments/reading card data is not possible on an emulator.
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