Skip to content

Commit

Permalink
add cardholderName param to getVeritransToken
Browse files Browse the repository at this point in the history
  • Loading branch information
DanRidh committed Aug 6, 2024
1 parent ef47067 commit e7af363
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pokepaylib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
minSdkVersion 26
targetSdkVersion 32
versionCode 0
versionName "2.0.15"
versionName "2.0.16"

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

Expand Down Expand Up @@ -66,7 +66,7 @@ uploadArchives {
repositories {
mavenDeployer {
repository url: "file://${repo.absolutePath}"
pom.version = '2.0.15' // version
pom.version = '2.0.16' // version
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ public class GetVeritransToken extends ExternalServiceRequest {
public String securityCode;
@NonNull
public String tokenApiKey;
@NonNull
public String cardholderName

public GetVeritransToken(@NonNull String cardNumber, @NonNull String cardExpiryDate, @NonNull String securityCode, @NonNull String tokenApiKey) {
public GetVeritransToken(@NonNull String cardNumber, @NonNull String cardExpiryDate, @NonNull String securityCode, @NonNull String tokenApiKey, @NonNull String cardholderName) {
this.cardNumber = cardNumber;
this.cardExpiryDate = cardExpiryDate;
this.securityCode = securityCode;
this.tokenApiKey = tokenApiKey;
this.cardholderName = cardholderName;
}

protected final String path() {
Expand All @@ -45,6 +48,7 @@ protected final Map<String, Object> parameters() {
put("card_expire", cardExpiryDate);
put("security_code", securityCode);
put("token_api_key", tokenApiKey);
put("cardholder_name", cardholderName);
}};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class GetVeritransTokenTest {
@Test
public void MDKTokenCanGet() throws ProcessingError {
try {
new GetVeritransToken(testCardNumber, "12/23", "123", testTokenApiKey).send();
new GetVeritransToken(testCardNumber, "12/23", "123", testTokenApiKey, 'FOO BAR').send();
} catch (ExternalServiceRequestError e) {
fail(e.toString());
}
Expand All @@ -25,7 +25,7 @@ public void MDKTokenCanGet() throws ProcessingError {
@Test
public void ThrowErrorIfdExpireDateIsInvalid() throws ProcessingError, ExternalServiceRequestError {
try {
new GetVeritransToken(testCardNumber, "1223", "123", testTokenApiKey).send();
new GetVeritransToken(testCardNumber, "1223", "123", testTokenApiKey, 'FOO BAR').send();
fail();
} catch (VeritransRequestError e) {
assertEquals("failure", e.error.status);
Expand Down

0 comments on commit e7af363

Please sign in to comment.