Browse Source

Penny test request fixes

master
Preyea Regmi 5 years ago
parent
commit
0ca5199144
  1. 661
      app/src/main/assets/dummykeyRelatedInfo.json
  2. 12
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/gateway/KYCV3Gateway.java
  3. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3GatewayInterface.java
  4. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3ViewModel.java
  5. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/view/KYCV3Activity.java
  6. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/view/autodebit/AutoDebitAddPromptFragment.java

661
app/src/main/assets/dummykeyRelatedInfo.json

@ -1,661 +0,0 @@
{
"City": [
{
"id": "Andong",
"text": "Andong"
},
{
"id": "Ansan",
"text": "Ansan"
},
{
"id": "Anseong",
"text": "Anseong"
},
{
"id": "Anyang",
"text": "Anyang"
},
{
"id": "Asan",
"text": "Asan"
},
{
"id": "Boryeong",
"text": "Boryeong"
},
{
"id": "Bucheon",
"text": "Bucheon"
},
{
"id": "Busan",
"text": "Busan"
},
{
"id": "Changwon",
"text": "Changwon"
},
{
"id": "Cheonan",
"text": "Cheonan"
},
{
"id": "Cheongjin",
"text": "Cheongjin"
},
{
"id": "Cheongju",
"text": "Cheongju"
},
{
"id": "Chuncheon",
"text": "Chuncheon"
},
{
"id": "Chungju",
"text": "Chungju"
},
{
"id": "Chungmu",
"text": "Chungmu"
},
{
"id": "Daecheon",
"text": "Daecheon"
},
{
"id": "Daegu",
"text": "Daegu"
},
{
"id": "Daejeon",
"text": "Daejeon"
},
{
"id": "Dangjin",
"text": "Dangjin"
},
{
"id": "Dongducheon",
"text": "Dongducheon"
},
{
"id": "Donggwangyang",
"text": "Donggwangyang"
},
{
"id": "Donghae",
"text": "Donghae"
},
{
"id": "Gaeseong",
"text": "Gaeseong"
},
{
"id": "Gangneung",
"text": "Gangneung"
},
{
"id": "Geoje",
"text": "Geoje"
},
{
"id": "Geumseong",
"text": "Geumseong"
},
{
"id": "Gimcheon",
"text": "Gimcheon"
},
{
"id": "Gimhae",
"text": "Gimhae"
},
{
"id": "Gimje",
"text": "Gimje"
},
{
"id": "Gimpo",
"text": "Gimpo"
},
{
"id": "Gongju",
"text": "Gongju"
},
{
"id": "Goyang",
"text": "Goyang"
},
{
"id": "Gumi",
"text": "Gumi"
},
{
"id": "Gunpo",
"text": "Gunpo"
},
{
"id": "Gunsan",
"text": "Gunsan"
},
{
"id": "Guri",
"text": "Guri"
},
{
"id": "Gwacheon",
"text": "Gwacheon"
},
{
"id": "Gwangju",
"text": "Gwangju"
},
{
"id": "Gwangmyeong",
"text": "Gwangmyeong"
},
{
"id": "Gwangyang",
"text": "Gwangyang"
},
{
"id": "Gyeongju",
"text": "Gyeongju"
},
{
"id": "Gyeongsan",
"text": "Gyeongsan"
},
{
"id": "Gyeongseong",
"text": "Gyeongseong"
},
{
"id": "Gyeryong",
"text": "Gyeryong"
},
{
"id": "Haeju",
"text": "Haeju"
},
{
"id": "Hamheung",
"text": "Hamheung"
},
{
"id": "Hanam",
"text": "Hanam"
},
{
"id": "Heungnam",
"text": "Heungnam"
},
{
"id": "Hwaseong",
"text": "Hwaseong"
},
{
"id": "Icheon",
"text": "Icheon"
},
{
"id": "Iksan",
"text": "Iksan"
},
{
"id": "Incheon",
"text": "Incheon"
},
{
"id": "Iri",
"text": "Iri"
},
{
"id": "Jangseungpo",
"text": "Jangseungpo"
},
{
"id": "Jecheon",
"text": "Jecheon"
},
{
"id": "Jeju",
"text": "Jeju"
},
{
"id": "Jeomchon",
"text": "Jeomchon"
},
{
"id": "Jeongeup",
"text": "Jeongeup"
},
{
"id": "Jeongju",
"text": "Jeongju"
},
{
"id": "Jeonju",
"text": "Jeonju"
},
{
"id": "Jinhae",
"text": "Jinhae"
},
{
"id": "Jinju",
"text": "Jinju"
},
{
"id": "Jinnampo",
"text": "Jinnampo"
},
{
"id": "Masan",
"text": "Masan"
},
{
"id": "Migeum",
"text": "Migeum"
},
{
"id": "Miryang",
"text": "Miryang"
},
{
"id": "Mokpo",
"text": "Mokpo"
},
{
"id": "Mungyeong",
"text": "Mungyeong"
},
{
"id": "Najin",
"text": "Najin"
},
{
"id": "Naju",
"text": "Naju"
},
{
"id": "Namwon",
"text": "Namwon"
},
{
"id": "Namyangju",
"text": "Namyangju"
},
{
"id": "Nonsan",
"text": "Nonsan"
},
{
"id": "Onyang",
"text": "Onyang"
},
{
"id": "Osan",
"text": "Osan"
},
{
"id": "Paju",
"text": "Paju"
},
{
"id": "Pocheon",
"text": "Pocheon"
},
{
"id": "Pohang",
"text": "Pohang"
},
{
"id": "Pyeongtaek",
"text": "Pyeongtaek"
},
{
"id": "Pyeongyang",
"text": "Pyeongyang"
},
{
"id": "Sacheon",
"text": "Sacheon"
},
{
"id": "Samcheok",
"text": "Samcheok"
},
{
"id": "Samcheonpo",
"text": "Samcheonpo"
},
{
"id": "Sangju",
"text": "Sangju"
},
{
"id": "Sariwon",
"text": "Sariwon"
},
{
"id": "Sejong",
"text": "Sejong"
},
{
"id": "Seogwipo",
"text": "Seogwipo"
},
{
"id": "Seongjin",
"text": "Seongjin"
},
{
"id": "Seongnam",
"text": "Seongnam"
},
{
"id": "Seosan",
"text": "Seosan"
},
{
"id": "Seoul",
"text": "Seoul"
},
{
"id": "Siheung",
"text": "Siheung"
},
{
"id": "Sineuiju",
"text": "Sineuiju"
},
{
"id": "Sokcho",
"text": "Sokcho"
},
{
"id": "Songjeong",
"text": "Songjeong"
},
{
"id": "Songnim",
"text": "Songnim"
},
{
"id": "Songtan",
"text": "Songtan"
},
{
"id": "Suncheon",
"text": "Suncheon"
},
{
"id": "Suwon",
"text": "Suwon"
},
{
"id": "Taebaek",
"text": "Taebaek"
},
{
"id": "Tongyeong",
"text": "Tongyeong"
},
{
"id": "Uijeongbu",
"text": "Uijeongbu"
},
{
"id": "Uiwang",
"text": "Uiwang"
},
{
"id": "Ulsan",
"text": "Ulsan"
},
{
"id": "Wonju",
"text": "Wonju"
},
{
"id": "Wonsan",
"text": "Wonsan"
},
{
"id": "Yangju",
"text": "Yangju"
},
{
"id": "Yangsan",
"text": "Yangsan"
},
{
"id": "Yeocheon",
"text": "Yeocheon"
},
{
"id": "Yeoju",
"text": "Yeoju"
},
{
"id": "Yeongcheon",
"text": "Yeongcheon"
},
{
"id": "Yeongju",
"text": "Yeongju"
},
{
"id": "Yeosu",
"text": "Yeosu"
},
{
"id": "Yongin",
"text": "Yongin"
}
],
"Bank": [
{
"id": "20",
"text": "Busan Bank(BNK)"
},
{
"id": "18",
"text": "Citibank Korea"
},
{
"id": "11",
"text": "Credit Union (Shinhyup)"
},
{
"id": "5",
"text": "Daegu Bank(DGB)"
},
{
"id": "6",
"text": "Deutsche Bank"
},
{
"id": "19",
"text": "HSBC"
},
{
"id": "3",
"text": "Industrial Bank of Korea(IBK)"
},
{
"id": "17",
"text": "Jeju Bank"
},
{
"id": "15",
"text": "Jeonbuk Bank(JB)"
},
{
"id": "28",
"text": "K Bank"
},
{
"id": "29",
"text": "KAKAO Bank"
},
{
"id": "13",
"text": "KEB Hana Bank"
},
{
"id": "26",
"text": "KEB Hana Bank - Old"
},
{
"id": "2",
"text": "Kookmin-Bank(KB)"
},
{
"id": "24",
"text": "Kookmin-Bank(KB) Old"
},
{
"id": "7",
"text": "Korea Development Bank(KDB)"
},
{
"id": "8",
"text": "Korea Federation of Community Credit Cooperatives(KFCC)"
},
{
"id": "14",
"text": "Korea Post(Epost)"
},
{
"id": "1",
"text": "Kwangju Bank(KJ)"
},
{
"id": "25",
"text": "Kyongnam Bank"
},
{
"id": "4",
"text": "Nonghyup Bank(NH)"
},
{
"id": "23",
"text": "Nonghyup Bank(NH) Old"
},
{
"id": "10",
"text": "Shinhan Bank"
},
{
"id": "16",
"text": "Standard Chartered Korea(SC First)"
},
{
"id": "9",
"text": "Suhyup Local Cooperatives"
},
{
"id": "27",
"text": "Welcome Savings Bank"
},
{
"id": "21",
"text": "Woori Bank"
}
],
"Id": [
{
"id": "1302",
"text": "Alien Registration Card",
"dependent": [
"docIssueDate",
"docExpiryDate"
]
},
{
"id": "8008",
"text": "National ID",
"dependent": [
"docIssueDate"
]
},
{
"id": "11012",
"text": "Driving License",
"dependent": [
"docIssueDate",
"docExpiryDate"
]
}
],
"Branch": [
{
"id": "2089",
"text": "Gimhae"
},
{
"id": "585219",
"text": "Mongol Town"
},
{
"id": "601326",
"text": "Gwangju"
},
{
"id": "1034",
"text": "Dongdaemun"
},
{
"id": "1035",
"text": "Hwaseong"
},
{
"id": "2080",
"text": "GME Online"
},
{
"id": "2087",
"text": "Ansan"
},
{
"id": "221269",
"text": "Songu-ri"
},
{
"id": "404519",
"text": "Hyehwa"
},
{
"id": "404520",
"text": "DDM CIS"
}
],
"PersonalInformation": {
"fullName": "kim in kwon",
"gender": "M",
"dob": "1988-03-22",
"email": "abc@def.com",
"city": "Wonju",
"address": "gm valley 903, hwagok-dong, gangseo-gu"
},
"PrimaryInformation": {
"bankId": "2",
"bankAccount": "40790204056295",
"passportNumber": "8803011284213",
"passportIssueDate": "2015-06-08",
"passportExpiryDate": "2015-06-21",
"anotherIDType": "1302",
"anotherIDNumber": "981231212",
"branchId": "2080",
"refferalCode": "GME-1241"
},
"Pictures": {
"passportPicture": "http://localhost:9500/handler/docs.ashx?img=dXBsb2FkLWZyb250LTIwMTkwMzIyMTQwMzE3NTQzMi5qcGVn&userId=MTEwOTM4&module=a3lj",
"anotherIDPicture": "http://localhost:9500/handler/docs.ashx?img=dXBsb2FkLWZyb250LTIwMTkwMzIyMTQwMzE3NTQzMi5qcGVn&userId=MTEwOTM4&module=a3lj"
}
}

12
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/gateway/KYCV3Gateway.java

@ -32,22 +32,14 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter
return HttpClientV2.getInstance().getKYCRelatedDAtaV3(auth, customerID, type);
}
@Override
public Observable<List<NativeCountry>> getNativeCountryListAsObservable(Context context) {
return Observable.fromCallable(() -> loadJSONFromAsset(context, "nativecountrylist.json"))
.map(nativeCountryJson -> HttpClientV2.getDeserializer().fromJson(nativeCountryJson, TypeToken.getParameterized(List.class, NativeCountry.class).getType()));
}
@Override
public List<NativeCountry> getNativeCountryList(Context context) {
return HttpClientV2.getDeserializer().fromJson(loadJSONFromAsset(context, "nativecountrylist.json"), TypeToken.getParameterized(List.class, NativeCountry.class).getType());
}
@Override
public Observable<KYCRelatedDataDTO> getKycRelatedDataDummy(Context context) {
return Observable.fromCallable(() -> loadJSONFromAsset(context, "dummykeyRelatedInfo.json"))
.map(nativeCountryJson -> HttpClientV2.getDeserializer().fromJson(nativeCountryJson, TypeToken.getParameterized(KYCRelatedDataDTO.class).getType()));
}
@Override
public Observable<ResponseBody> validateParameters(String idType, String idNumber) {

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3GatewayInterface.java

@ -19,10 +19,8 @@ public interface KYCV3GatewayInterface extends PrivilegedGatewayInterface {
Observable<ResponseBody> getKycRelatedData(String auth,String customerID,String type);
Observable<List<NativeCountry>> getNativeCountryListAsObservable(Context context);
List<NativeCountry> getNativeCountryList(Context context);
Observable<KYCRelatedDataDTO> getKycRelatedDataDummy(Context context);
Observable<ResponseBody> validateParameters(String idType, String idNumber);

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3ViewModel.java

@ -197,7 +197,7 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
if (shouldRedirectToPennyTestScreen)
new Handler().postDelayed(() -> requestPennyTestFromServer("N"), 300);
new Handler().postDelayed(() -> requestPennyTestFromServer("Y"), 300);
}

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/view/KYCV3Activity.java

@ -272,7 +272,7 @@ public class KYCV3Activity extends BaseActivity implements KYCV3PresenterInterfa
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == ADD_KFTC_REQUEST && resultCode == Activity.RESULT_OK) {
viewModel.requestPennyTestFromServer("N");
viewModel.requestPennyTestFromServer("Y");
}
}

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/view/autodebit/AutoDebitAddPromptFragment.java

@ -50,7 +50,7 @@ public class AutoDebitAddPromptFragment extends BaseFragment {
@OnClick(R.id.tv_no)
public void requestPennyTest()
{
ViewModelProviders.of(getActivity()).get(KYCV3ViewModel.class).requestPennyTestFromServer("N");
ViewModelProviders.of(getActivity()).get(KYCV3ViewModel.class).requestPennyTestFromServer("Y");
}
}
Loading…
Cancel
Save