|
|
@ -19,25 +19,28 @@ import static com.remit.jmecustomer.base.PrefKeys.USER_PREFERRED_COUNTRY_CODE; |
|
|
|
public class ExchangeRateGateway extends PrivilegedGateway implements ExchangeRateInteractorInterface.ExchangeRateGatewayInterface { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Observable<ExchangeCalculationApiResponse> sendDataForForexCalculation(String auth, String senderCountryId, String senderCurrency, String recieverCurrency, |
|
|
|
String senderAmount, String recieverAmount, String paymentMethodId, |
|
|
|
String calculationPreference, String recipientCountryName, String recieverCountryId) { |
|
|
|
|
|
|
|
JsonObject jsonObject=new JsonObject(); |
|
|
|
jsonObject.addProperty("sCountry",senderCountryId); |
|
|
|
jsonObject.addProperty("sCurrency",senderCurrency); |
|
|
|
jsonObject.addProperty("pCurrency",recieverCurrency); |
|
|
|
jsonObject.addProperty("calcBy",calculationPreference); |
|
|
|
jsonObject.addProperty("cAmount",senderAmount); |
|
|
|
jsonObject.addProperty("pAmount",recieverAmount); |
|
|
|
jsonObject.addProperty("serviceType",paymentMethodId); |
|
|
|
jsonObject.addProperty("pCountry",recieverCountryId); |
|
|
|
jsonObject.addProperty("pCountryName",recipientCountryName); |
|
|
|
JsonObject jsonObject = new JsonObject(); |
|
|
|
jsonObject.addProperty("sCountry", senderCountryId); |
|
|
|
jsonObject.addProperty("sCurrency", senderCurrency); |
|
|
|
jsonObject.addProperty("pCurrency", recieverCurrency); |
|
|
|
jsonObject.addProperty("calcBy", calculationPreference); |
|
|
|
jsonObject.addProperty("cAmount", senderAmount); |
|
|
|
jsonObject.addProperty("pAmount", recieverAmount); |
|
|
|
jsonObject.addProperty("serviceType", paymentMethodId); |
|
|
|
jsonObject.addProperty("pCountry", recieverCountryId); |
|
|
|
jsonObject.addProperty("pCountryName", recipientCountryName); |
|
|
|
|
|
|
|
if (!getUserIDNumber().isEmpty()) { |
|
|
|
jsonObject.addProperty("userId", getUserID()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return HttpClientV2.getInstance().calculateExchangeRateV2(auth,jsonObject); |
|
|
|
return HttpClientV2.getInstance().calculateExchangeRateV2(auth, jsonObject); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -46,38 +49,38 @@ public class ExchangeRateGateway extends PrivilegedGateway implements ExchangeRa |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public List<CountryPaymentServiceSeedValueModel> getAllSeedVAluesV2() { |
|
|
|
List<CountryPaymentServiceSeedValueModel> seedData=new ArrayList<>(); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("AZ","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("BD","100000","BDT")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("BY","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("KH","500","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("GE","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("IN","100000","INR")); |
|
|
|
List<CountryPaymentServiceSeedValueModel> seedData = new ArrayList<>(); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("AZ", "1000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("BD", "100000", "BDT")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("BY", "1000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("KH", "500", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("GE", "1000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("IN", "100000", "INR")); |
|
|
|
// seedData.add(new CountryPaymentServiceSeedValueModel("ID","15000000","IDR")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("KZ","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("KG","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("MY","10000","MYR")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("MD","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("MN","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("MN","2000000","MNT")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("MM","1500000","MMK")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("NP","100000","NPR")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("PK","100000","PKR")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("PH","500","PHP")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("RU","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("SG","2000","SGD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("KZ", "1000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("KG", "1000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("MY", "10000", "MYR")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("MD", "1000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("MN", "1000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("MN", "2000000", "MNT")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("MM", "1500000", "MMK")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("NP", "100000", "NPR")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("PK", "100000", "PKR")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("PH", "500", "PHP")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("RU", "1000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("SG", "2000", "SGD")); |
|
|
|
// seedData.add(new CountryPaymentServiceSeedValueModel("LK","100000","LKR")); |
|
|
|
// seedData.add(new CountryPaymentServiceSeedValueModel("LK","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("TJ","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("TH","30000","THB")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("UZ","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("UZ","1000000","UZS")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("VN","50000000","VND")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("VN","2000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("UA","1000","USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("TJ", "1000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("TH", "30000", "THB")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("UZ", "1000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("UZ", "1000000", "UZS")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("VN", "50000000", "VND")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("VN", "2000", "USD")); |
|
|
|
seedData.add(new CountryPaymentServiceSeedValueModel("UA", "1000", "USD")); |
|
|
|
|
|
|
|
return seedData; |
|
|
|
} |
|
|
@ -85,10 +88,8 @@ public class ExchangeRateGateway extends PrivilegedGateway implements ExchangeRa |
|
|
|
|
|
|
|
@Override |
|
|
|
public String getPreferredCountryCode() { |
|
|
|
return RemitApplication.getStorage().getString(USER_PREFERRED_COUNTRY_CODE,"en"); |
|
|
|
return RemitApplication.getStorage().getString(USER_PREFERRED_COUNTRY_CODE, "en"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |