Transactions Activity Result

Transactions Activity Result

On the onActivityResult(int requestCode, int resultCode, Intent data) The Intent data will contain the return value as extra all in String value. If there is a problem with the data sent to the application, an error code will be sent back into the TERMINALERRORCODE extraData, other wise, RSPCODE will be the response code from the switch.

Error Codes

Value of the error code if application reject:

Error code valueDescription
-1API extra data is missing
-2Amount or the Invoice sent is invalid
-3Transaction type is invalid
-5Invoice number is already voided
-8Battery is too low (less than 8%)

Extra Data

List of extra data receive:

Extra data on activity resultDescriptionType
TERMINALERRORCODETerminal error codeInteger
RSPCODEResponse codeString
INVNBRInvoice numberString
TRXDATETransaction dateString
TRXTIMETransaction timeString
CARDNUMBERMasked card numberString
EXPDATEExpiration date of the cardString
WSNWorkstation numberString
MIDMerchant IDString
AMOUNTAmount of the transactionString
ORIGINALAMOUNTOriginal amount of the transaction if a partial transactionString
PARTIALIf a partial redemption will be trueBoolean
TCNTransaction confirmation numberString
TCRNumber of the transaction to cancelString
CTMCTM value, extra data print on the receiptString
CLERKIDClerk idString

Code Example

JavaScript
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); String value = ""; if (data != null ) { value += "TERMINALERRORCODE = " + data.getIntExtra("TERMINALERRORCODE", 0) + "\n"; value += "WSN = " + data.getStringExtra("TERMID") + "\n"; value += "MID = " + data.getStringExtra("MID") + "\n"; value += "AMOUNT = " + data.getStringExtra("AMOUNT") + "\n"; value += "TRXDATE = " + data.getStringExtra("TRXDATE") + "\n"; value += "TRXTIME = " + data.getStringExtra("TRXTIME") + "\n"; value += "RSPCODE = " + data.getStringExtra("RSPCODE") + "\n"; value += "INVNBR = " + data.getStringExtra("INVNBR") + "\n"; value += "TCN = " + data.getStringExtra("TCN") + "\n"; value += "TCR = " + data.getStringExtra("TCR") + "\n"; value += "CTM = " + data.getStringExtra("CTM") + "\n"; value += "EXPDATE = " + data.getStringExtra("EXPDATE") + "\n"; value += "CARDNUMBER = " + data.getStringExtra("MASKEDCARDNBR") + "\n"; value += "CLERKID = " + data.getStringExtra("CLERKID") + "\n"; } AlertDialog alertDialog = new AlertDialog.Builder(MainActivity.this).create(); alertDialog.setTitle("Alert"); alertDialog.setMessage(value); alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); alertDialog.show(); ((TextView)findViewById(R.id.textView)).setText( "Response code = " + String.format("%03d",resultCode)); }
    • Related Articles

    • Transactions Activity Result

      On the onActivityResult(int requestCode, int resultCode, Intent data) The Intent data will contain the return value as extra all in String value. If there is a problem with the data sent to the application, an error code will be sent back into the ...
    • Transactions to DataCandy Application

      To call the PayFacto DataCandy application, a developer needs to create an Android intent. JavaScript Intent intent = new Intent("com.payfacto.payfactodatacandy.DATACANDY_ACTIVITY"); Extra Data Additional data are required to complete the intent: ...
    • Transactions to Secure Payment Application

      To call the PayFacto payment application, a developer needs to create an Android intent. JavaScript Intent intent = new Intent("com.payfacto.terminal.payment.PAYMENT_ACTIVITY"); Additional data is required to complete the intent as explained in the ...
    • Address Verification Status (AVS) Result Codes

      INTRODUCTION During a transaction where the customer's card is not presented at the merchant's location (inputType : I or M), the merchant can enter the address corresponding to his credit card statement on the payment page. This validation technique ...
    • Example Calls to the Secure Payment Application

      This page lists code examples for the various Secure Payment transactions Purchase JavaScript Intent intent = new Intent("com.payfacto.terminal.payment.PAYMENT_ACTIVITY");   intent.putExtra("TRANSACTION", "SALE"); intent.putExtra("AMOUNT", "100"); // ...