99import org .junit .jupiter .api .Test ;
1010
1111import java .math .BigDecimal ;
12- import java .util .Date ;
1312import java .util .Optional ;
1413
1514import 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