7
7
import com .flutterwave .raveandroid .RaveConstants ;
8
8
import com .flutterwave .raveandroid .FeeCheckRequestBody ;
9
9
import com .flutterwave .raveandroid .Payload ;
10
- import com .flutterwave .raveandroid .RavePayActivity ;
11
10
import com .flutterwave .raveandroid .RavePayInitializer ;
12
11
import com .flutterwave .raveandroid .Utils ;
13
12
import com .flutterwave .raveandroid .data .Callbacks ;
@@ -40,10 +39,10 @@ public CardPresenter(Context context, CardContract.View mView) {
40
39
}
41
40
42
41
@ Override
43
- public void chargeCard (final Payload payload ) {
42
+ public void chargeCard (final Payload payload , String secretKey ) {
44
43
45
44
String cardRequestBodyAsString = Utils .convertChargeRequestPayloadToJson (payload );
46
- String encryptedCardRequestBody = Utils .getEncryptedData (cardRequestBodyAsString , RavePayActivity . getSecretKey () ).trim ().replaceAll ("\\ n" , "" );
45
+ String encryptedCardRequestBody = Utils .getEncryptedData (cardRequestBodyAsString , secretKey ).trim ().replaceAll ("\\ n" , "" );
47
46
48
47
// Log.d("encrypted", encryptedCardRequestBody);
49
48
@@ -102,8 +101,9 @@ public void onError(String message, String responseAsJSONString) {
102
101
});
103
102
}
104
103
104
+
105
105
@ Override
106
- public void chargeCardWithSuggestedAuthModel (Payload payload , String zipOrPin , String authModel ) {
106
+ public void chargeCardWithSuggestedAuthModel (Payload payload , String zipOrPin , String authModel , String secretKey ) {
107
107
108
108
if (authModel .equalsIgnoreCase (AVS_VBVSECURECODE )) {
109
109
payload .setBillingzip (zipOrPin );
@@ -115,7 +115,7 @@ else if (authModel.equalsIgnoreCase(PIN)){
115
115
payload .setSuggestedAuth (authModel );
116
116
117
117
String cardRequestBodyAsString = Utils .convertChargeRequestPayloadToJson (payload );
118
- String encryptedCardRequestBody = Utils .getEncryptedData (cardRequestBodyAsString , RavePayActivity . getSecretKey () ).trim ().replaceAll ("\\ n" , "" );
118
+ String encryptedCardRequestBody = Utils .getEncryptedData (cardRequestBodyAsString , secretKey ).trim ().replaceAll ("\\ n" , "" );
119
119
120
120
// Log.d("encrypted", encryptedCardRequestBody);
121
121
@@ -219,6 +219,7 @@ public void requeryTx(final String flwRef, final String SECKEY, final boolean sh
219
219
body .setSECKEY (SECKEY );
220
220
221
221
mView .showFullProgressIndicator (true );
222
+ mView .showProgressIndicator (true );
222
223
223
224
new NetworkRequestImpl ().requeryTx (body , new Callbacks .OnRequeryRequestComplete () {
224
225
@ Override
0 commit comments