Skip to content

Commit

Permalink
Revert "Integrated Payment-Hub to allow Third Party Transfers between…
Browse files Browse the repository at this point in the history
… different fineract instances"

This reverts commit efce97e.
  • Loading branch information
geekanamika committed Oct 13, 2019
1 parent efce97e commit da0e1cc
Show file tree
Hide file tree
Showing 30 changed files with 30 additions and 593 deletions.
5 changes: 0 additions & 5 deletions app/src/commonTest/java/org/mifos/mobile/FakeJsonName.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,4 @@ public class FakeJsonName {
public static final String CLIENT_JSON = "client.json";

public static final String UPDATE_PASSWORD_PAYLOAD_JSON = "updatePasswordPayload.json";

public static final String THIRD_PARTY_BENEFICIARY_LIST = "thirdPartyBeneficiaryList.json";

public static final String PAYMENT_HUB_USER_JSON = "paymentHubUser.json";

}
14 changes: 0 additions & 14 deletions app/src/commonTest/java/org/mifos/mobile/FakeRemoteDataSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import org.mifos.mobile.models.Charge;
import org.mifos.mobile.models.Page;
import org.mifos.mobile.models.PaymentHubUser;
import org.mifos.mobile.models.Transaction;
import org.mifos.mobile.models.UpdatePasswordPayload;
import org.mifos.mobile.models.User;
Expand All @@ -14,7 +13,6 @@
import org.mifos.mobile.models.beneficiary.Beneficiary;
import org.mifos.mobile.models.beneficiary.BeneficiaryPayload;
import org.mifos.mobile.models.beneficiary.BeneficiaryUpdatePayload;
import org.mifos.mobile.models.beneficiary.ThirdPartyBeneficiary;
import org.mifos.mobile.models.client.Client;
import org.mifos.mobile.models.client.ClientAccounts;
import org.mifos.mobile.models.guarantor.GuarantorPayload;
Expand Down Expand Up @@ -195,11 +193,6 @@ public static List<GuarantorPayload> getGuarantorsList() {
}, FakeJsonName.GUARANTOR_LIST);
}

public static List<ThirdPartyBeneficiary> getThirdPartyBeneficiaryList() {
return mTestDataFactory.getListTypePojo(new TypeToken<List<ThirdPartyBeneficiary>>() {
}, FakeJsonName.THIRD_PARTY_BENEFICIARY_LIST);
}

public static SavingsAccountTemplate getSavingAccountApplicationTemplate() {
return mTestDataFactory.getObjectTypePojo(SavingsAccountTemplate.class,
FakeJsonName.SAVINGS_ACCOUNT_TEMPLATE);
Expand All @@ -210,11 +203,4 @@ public static UpdatePasswordPayload getUpdatePasswordPayload() {
FakeJsonName.UPDATE_PASSWORD_PAYLOAD_JSON);

}

public static PaymentHubUser getPaymentHubUser() {
return mTestDataFactory.getObjectTypePojo(PaymentHubUser.class,
FakeJsonName.PAYMENT_HUB_USER_JSON);

}
}

28 changes: 0 additions & 28 deletions app/src/debug/java/org/mifos/mobile/api/ApiInterceptor.java

This file was deleted.

8 changes: 0 additions & 8 deletions app/src/debug/java/org/mifos/mobile/api/BaseURL.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ public class BaseURL {
public static final String API_PATH = "/fineract-provider/api/v1/self/";
public static final String PROTOCOL_HTTPS = "https://";

public static final String PAYMENT_HUB_API_ENDPOINT = "buffalo.mlabs.dpc.hu";
public static final String PAYMENT_HUB_API_PATH = "/api/";


private String url;

public String getUrl() {
Expand All @@ -31,8 +27,4 @@ public String getDefaultBaseUrl() {
public String getUrl(String endpoint) {
return endpoint + API_PATH;
}

public String getPaymentHubUrl() {
return PROTOCOL_HTTPS + PAYMENT_HUB_API_ENDPOINT + PAYMENT_HUB_API_PATH;
}
}
17 changes: 0 additions & 17 deletions app/src/main/java/org/mifos/mobile/PartyIdInfo.kt

This file was deleted.

2 changes: 0 additions & 2 deletions app/src/main/java/org/mifos/mobile/api/ApiEndPoints.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@ public class ApiEndPoints {
public static final String REGISTRATION = "registration";
public static final String DEVICE = "device";
public static final String USER = "user";
public static final String PAYMENT_HUB_CHANNEL_TRANSACTIONS = "transactions";


}
33 changes: 0 additions & 33 deletions app/src/main/java/org/mifos/mobile/api/BaseApiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,14 @@
import org.mifos.mobile.api.services.GuarantorService;
import org.mifos.mobile.api.services.LoanAccountsListService;
import org.mifos.mobile.api.services.NotificationService;
import org.mifos.mobile.api.services.PaymentHubService;
import org.mifos.mobile.api.services.RecentTransactionsService;
import org.mifos.mobile.api.services.RegistrationService;
import org.mifos.mobile.api.services.SavingAccountsListService;
import org.mifos.mobile.api.services.ThirdPartyTransferService;
import org.mifos.mobile.api.services.UserDetailsService;

import java.util.concurrent.TimeUnit;

import javax.inject.Inject;

import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
Expand All @@ -32,7 +27,6 @@
public class BaseApiManager {

private static Retrofit retrofit;
private static Retrofit paymentHubRetrofit;
private static AuthenticationService authenticationApi;
private static ClientService clientsApi;
private static SavingAccountsListService savingAccountsListApi;
Expand All @@ -45,34 +39,11 @@ public class BaseApiManager {
private static NotificationService notificationApi;
private static GuarantorService guarantorService;
private static UserDetailsService userDetailsService;
private static PaymentHubService paymentHubService;

@Inject
public BaseApiManager(PreferencesHelper preferencesHelper) {
createService(preferencesHelper.getBaseUrl(), preferencesHelper.getTenant(),
preferencesHelper.getToken());
createPaymentHubService("tn01");
}

public static void createPaymentHubService(String tenant) {
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);

OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS)
.writeTimeout(60, TimeUnit.SECONDS)
.addInterceptor(interceptor)
.addInterceptor(new ApiInterceptor(tenant))
.build();

paymentHubRetrofit = new Retrofit.Builder()
.baseUrl(new BaseURL().getPaymentHubUrl())
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.client(okHttpClient)
.build();
paymentHubService = paymentHubRetrofit.create(PaymentHubService.class);
}

private static void init() {
Expand Down Expand Up @@ -151,8 +122,4 @@ public GuarantorService getGuarantorApi() {
public UserDetailsService getUserDetailsService() {
return userDetailsService;
}

public PaymentHubService getPaymentHubApi() {
return paymentHubService;
}
}
10 changes: 0 additions & 10 deletions app/src/main/java/org/mifos/mobile/api/DataManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import org.mifos.mobile.api.local.DatabaseHelper;
import org.mifos.mobile.api.local.PreferencesHelper;
import org.mifos.mobile.models.Charge;
import org.mifos.mobile.models.beneficiary.ThirdPartyBeneficiary;
import org.mifos.mobile.models.client.Client;
import org.mifos.mobile.models.guarantor.GuarantorApplicationPayload;
import org.mifos.mobile.models.guarantor.GuarantorPayload;
Expand All @@ -28,7 +27,6 @@
import org.mifos.mobile.models.client.ClientAccounts;
import org.mifos.mobile.models.notification.NotificationUserDetail;
import org.mifos.mobile.models.payload.LoansPayload;
import org.mifos.mobile.models.payload.PaymentHubTransferPayload;
import org.mifos.mobile.models.payload.TransferPayload;
import org.mifos.mobile.models.register.RegisterPayload;
import org.mifos.mobile.models.register.UserVerify;
Expand Down Expand Up @@ -338,12 +336,4 @@ public ObservableSource<? extends ResponseBody> apply(Throwable throwable)
});
}

public Observable<List<ThirdPartyBeneficiary>> getThirdPartyBeneficiaryList() {
return Observable.just(FakeRemoteDataSource.getThirdPartyBeneficiaryList());
}

public Observable<ResponseBody> makePaymentHubTransfer(PaymentHubTransferPayload payload) {
return baseApiManager.getPaymentHubApi().makeTransfer(payload);
}

}

This file was deleted.

30 changes: 0 additions & 30 deletions app/src/main/java/org/mifos/mobile/models/PaymentHubUser.kt

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions app/src/main/java/org/mifos/mobile/models/paymentHub/Amount.kt

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit da0e1cc

Please sign in to comment.