Skip to content

Commit

Permalink
feat: add card tds status.
Browse files Browse the repository at this point in the history
  • Loading branch information
nonz250 committed Nov 14, 2024
1 parent e2941a2 commit a4189be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/main/java/jp/pay/model/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class Card extends ExternalAccount implements MetadataStore<Card> {
Map<String, String> metadata = new HashMap<String, String>();
String email;
String phone;
String threeDSecureStatus;

public Card update(Map<String, Object> params)
throws AuthenticationException, InvalidRequestException,
Expand Down Expand Up @@ -201,4 +202,8 @@ public String getPhone() {
return phone;
}

public String getThreeDSecureStatus() {
return threeDSecureStatus;
}

}
5 changes: 3 additions & 2 deletions src/test/java/jp/pay/model/ChargeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void unmockPayjpResponseGetter() {
@Test
public void testDeserialize() throws PayjpException, IOException {
String json = resource("charge.json");

Charge ch = APIResource.GSON.fromJson(json, Charge.class);

assertEquals("ch_fa990a4c10672a93053a774730b0a", ch.getId());
Expand Down Expand Up @@ -106,7 +106,8 @@ public void testDeserialize() throws PayjpException, IOException {
assertEquals("e1d8225886e3a7211127df751c86787f", ca.getFingerprint());
assertEquals("[email protected]", ca.getEmail());
assertEquals("+81301234567", ca.getPhone());

assertNull(ca.getThreeDSecureStatus());

assertEquals("Visa", ca.getBrand());
}
}
3 changes: 2 additions & 1 deletion src/test/resources/jp/pay/model/charge.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"name": "PAY TARO",
"object": "card",
"email": "[email protected]",
"phone": "+81301234567"
"phone": "+81301234567",
"three_d_secure_status": null
},
"created": 1578372537,
"currency": "jpy",
Expand Down

0 comments on commit a4189be

Please sign in to comment.