Skip to content

Commit d32b595

Browse files
Revert "Adding a country parameter to the card request"
This reverts commit 1c8c342.
1 parent b31cc8f commit d32b595

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

src/main/java/com/flutterwave/bean/CardRequest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@
1212
public class CardRequest extends Shared{
1313

1414
private String card_number;
15-
private String country;
1615
private String cvv;
1716
private String expiry_month;
1817
private String expiry_year;
1918
private Authorization authorization;
2019

2120
public CardRequest(String card_number,
22-
String country,
2321
String cvv,
2422
String expiry_month,
2523
String expiry_year,
@@ -32,7 +30,6 @@ public CardRequest(String card_number,
3230
Authorization authorization){
3331

3432
this.card_number = card_number;
35-
this.country = country;
3633
this.cvv = cvv;
3734
this.expiry_month = expiry_month;
3835
this.expiry_year = expiry_year;

src/test/java/com/flutterwave/services/CardChargeTest.java

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import org.junit.jupiter.api.Test;
1010

1111
import java.math.BigDecimal;
12-
import java.util.Date;
1312
import java.util.Optional;
1413

1514
import static com.flutterwave.bean.AuthorizationModes.PIN;
@@ -26,24 +25,22 @@ void setUp() {
2625
Environment.setPublicKey(getProperty("PUB_KEY"));
2726
Environment.setEncryptionKey(getProperty("ENCR_KEY"));
2827

29-
cardRequest = new CardRequest("4187427415564246",
30-
"NG",
31-
"812",
32-
"10",
33-
"33",
34-
"NGN", new BigDecimal("10000"),
35-
"Tafa Chati",
36-
"test@gmail.io",
37-
"javasdk-test-" + new Date(),
28+
cardRequest = new CardRequest("5438898014560229",
29+
"564",
30+
"09",
31+
"32",
32+
"NGN",
33+
new BigDecimal("100.88"),
34+
"Yolande Aglaé Colbert",
35+
"tafchaty@gmail.com",
36+
"javasdk-test",
3837
"https://www,flutterwave.ng",
3938
null);
4039
}
4140

4241
@Test
4342
void runTransaction() {
4443
Assertions.assertEquals("success", new CardCharge().runTransaction(cardRequest).getStatus());
45-
//System.out.println(new CardCharge().runTransaction(cardRequest).getData().getId());
46-
//verifyTransaction(new CardCharge().runTransaction(cardRequest).getData().getId());
4744
}
4845

4946
@Test
@@ -60,8 +57,6 @@ void authorizeTransactionPin() {
6057
case REDIRECT -> {
6158
//redirect user
6259
}
63-
case OTP -> cardRequest.setAuthorization(new Authorization().pinAuthorization("3310"));
64-
default -> throw new IllegalArgumentException("Unexpected value: " + response.getMeta().getAuthorization().getMode());
6560
}
6661
Response authorizeResponse = new CardCharge().runTransaction(cardRequest);
6762
System.out.println("authorizeResponse response ==>" + authorizeResponse);

0 commit comments

Comments
 (0)