Migrating from card.io (Android)

If you haven't already, follow the "Importing DyScan" steps in the General Integration Guide.

Import the following DyScan classes in your Activity that will launch DyScan:

import com.dyneti.android.dyscan.DyScanActivity;
import com.dyneti.android.dyscan.CreditCard;

Rename CardIOActivity to DyScanActivity and remove all putExtra commands on the intent. Make a new putExtra for the key "api-key." This will look like

Intent scanIntent = new Intent(this, DyScanActivity.class);
scanIntent.putExtra("api-key", "api_key_string");

CreditCard is analogous to card.io's, but contains fewer methods. You can access the relevant fields by indexing cardNumber, expiryMonth, and expiryYear.

Last updated