Enable your users to accept and make contactless payments with any NFC device across any card scheme using any programming language.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import com.e.tapready.Tprd_MessageIntents
import com.e.tapready.Tprd_TTP
private val messageReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
if (Tprd_MessageIntents.ACTION_RECEIVE_MESSAGE == intent.action) {
val receivedString = intent.getStringExtra("YOUR_STRING_EXTRA")
sendEvent(receivedString ?: "")
}
}
}
fun personalize(clientKey: String, tokenisedUserId: String, promise: Promise) {
val tprdCard = tprdTtp.personalize(clientKey, tokenisedUserId)
val resultMap = Arguments.createMap()
resultMap.putBoolean("isOK", tprdCard.isOK)
resultMap.putString("errorMessage", tprdCard.errorMessage)
promise.resolve(resultMap)
}