Description
The Retail Auth function is used to obtain an authentication token which is needed for processing transactions.
Request
The following table describes the parameters of the Validation request message:
Parameter | Meaning |
---|---|
launchType | “No Auth” is used for launching the Ecentric Payment app authenticate a user and to obtain an auth token |
merchantID | The merchant ID assigned to the merchant |
secretKey | To be provided by Ecentric |
accessKey | To be provided by Ecentric |
Sample code
private String appURL = “payment.thumbzup.com”;
private String appClass = “payment.thumbzup.com.IntentActivity”;
Intent intent = new Intent();
intent.setClassName(appURL, appClass);
Bundle dataBundle = new Bundle();
dataBundle.putString(“launchType”, “RETAIL_AUTH”);
dataBundle.putString(“merchantID”, “YOUR MERCHANT ID");
dataBundle.putString(“secretKey”, “YOUR SECRET KEY”);
dataBundle.putString(“accessKey”, “YOUR ACCESS KEY”);
intent.putExtra(“thumbzupBundle”, dataBundle);
startActivityForResult(intent, 0);
Response
Sample code
@Override
protected void onActivityResult(int requestCode, int resCode, Intent data) {
String result = "";
Bundle b = new Bundle(data.getBundleExtra("thumbzupApplicationResponse"));
if(resCode == Activity.RESULT_OK) {
// handle ok result
String launchType = b.getString("launchType");
String resultCode = b.getString("resultCode");
String resultDescription = b.getString("resultDescription");
String merchantName = b.getString("merchantName");
String authenticationKey = b.getString("authenticationKey");
}
}
Errors Message:
Sample code
public static final String errorTypeKey = "errorType";
public static final String descriptionKey = "description";
public static final String messageKey = "message";
public static final String referenceKey = "reference";