Skip to content

Commit

Permalink
Update the pre-requisite for creating single token parameter `should_…
Browse files Browse the repository at this point in the history
…authenticate` to false
  • Loading branch information
ahmadAlfhajri committed Feb 19, 2025
1 parent 3b3f4e2 commit 4710c09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xendit-android/src/androidTest/java/com/xendit/AuthTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void onError(XenditError xenditError) {
@Override
public void interceptRequest(JsonObject jsonObj, String url) {
// verify if the json object contains card_data
assertEquals(jsonObj.get("should_authenticate").getAsString(), "true");
assertEquals(jsonObj.get("should_authenticate").getAsString(), "false");
assertNotNull(jsonObj.get("card_data").getAsJsonObject().get("account_number"));
assertNotNull(jsonObj.get("card_data").getAsJsonObject().get("exp_year"));
assertNotNull(jsonObj.get("card_data").getAsJsonObject().get("exp_month"));
Expand All @@ -139,7 +139,7 @@ public void interceptResponse(Object interceptedMessage) {
AuthenticatedToken authenticatedToken = (AuthenticatedToken) interceptedMessage;
System.out.println("AuthenticatedToken " + authenticatedToken);
assertNotNull(authenticatedToken.getId());
assertEquals(authenticatedToken.getStatus(), "IN_REVIEW");
assertEquals(authenticatedToken.getStatus(), "VERIFIED");
authToken[0] = authenticatedToken.getId();
done[0] = true;
}
Expand All @@ -149,7 +149,7 @@ public void interceptResponseFailed(String error) {
fail();
}
});
x.createSingleUseToken(card, 10000, true, onBehalfOf, callback);
x.createSingleUseToken(card, 10000, false, onBehalfOf, callback);

Awaitility.await().atMost(10, TimeUnit.SECONDS).until(() -> done[0]);

Expand Down

0 comments on commit 4710c09

Please sign in to comment.