VACThinClient Visa integration.

mohits10
Dabbler

VACThinClient Visa integration.

Hi Visa,

I am working on VAC ThinClient SDK. but I understand your SDK . and I have facing some issue related to implementation .or put the ids.

I will not able to decided what id insert or not .so please suggest me.

 

I have already given the methods and highlight blue colors. so please suggest me .

 

Thanks & Regards 

Mohit Singh 

 





private void
initVisaThinClient() {
try {
JSONObject config = new JSONObject();
config.put("serverBaseUrl", "https://sandbox.api.visa.com");
config.put("isoCountry", "United States");
config.put("isoLanguage", "English");
// Below keys are sample keys
String serverEncPub =
"{\"kty\":\"EC\",\"use\":\"enc\",\"crv\":\"P-256\",\"kid\":\"332\","
+ "\"x\":\"put value here","
+ "\"y\":\"put value here"}";
String serverAuthPub =
"{\"kty\":\"EC\",\"use\":\"sig\",\"crv\":\"P-256\",\"kid\":\"2343\","
+ "\"x\":\"put value here","
+ "\"y\":\"put value here"}";

// deviceAuthJwk is needed to enroll device rest call with VAC BE,
// in response vacDeviceId and kid for deviceAuthPub key
ArrayList<String> deviceCerts = VACThinClient.getInstance().init(this.getApplicationContext(), serverEncPub, serverAuthPub, config);
if(deviceCerts != null) {
//Do your enroll device rest call and get VacDeviceId, deviceAuthPubKID and X-VIA-HINT and do the enrollDevice() with SDK
JSONObject enrollmentConfig = new JSONObject();
enrollmentConfig.put("vacDeviceId", "nq78zNnioJxgtcsPG9d6qH7Z");
enrollmentConfig.put("deviceAuthPubKID", "45557");
List<String> hintList = new ArrayList<>();//Put your value here
if (hintList != null) {
String xViaHint = hintList.get(0);
enrollmentConfig.put("x-via-hint", xViaHint);
}
VACThinClient.getInstance().enrollDevice(enrollmentConfig, new VACThinClient.EnrollCallback() {
@Override
public void onSuccess(TransactionConfig transactionConfig) {
mPreferences.edit().putBoolean("enrollDone", true).apply();
Log.v(TAG, "Enrollment success");
}

@Override
public void onError(final int i) {
Log.v(TAG, "Enrollment failure");
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(CheckoutActivity.this.getBaseContext(),
String.valueOf(i), Toast.LENGTH_LONG)
.show();
}
});
}
});
}

} catch (Exception e) {
e.printStackTrace();
Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
}
}

 

2 REPLIES 2
jenn_kh
Community Moderator

Re: VACThinClient Visa integration.

Hi, @mohits10. Thank you for reaching out! An agent is looking for a solution for you and will get back to you shortly! If any community members know a solution, please feel free to respond in this thread. -Jenn

I_Doroteo3
Visa Developer Support Specialist

Re: VACThinClient Visa integration.

Hi @mohits10

 

Because Visa Acceptance Cloud is a restricted product, please speak to your Visa Representative or submit your inquiry to Developer@visa.com.

 

Thanks, 

Illana