Browse Source

- Link API

- fix bugs
pull/1/head
InKwon James Kim 5 years ago
parent
commit
27d368ccf3
  1. BIN
      .DS_Store
  2. 9
      GME Remit/APIs/Router/APIRouter.swift
  3. 6
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/KYCInfromation.swift
  4. 657
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Service/NewRegisterStep1Service.swift
  5. 2
      GME Remit/MultiLanguages/ur-PK.lproj/Localizable.strings
  6. 41
      GME Remit/Utilities/HotLine/Application Logic/Service/HotLineService.swift
  7. 2
      GME Remit/Utilities/TablePresenter/User Interface/View/TablePresenter.storyboard
  8. 20
      GME RemitTests/APITest.swift

BIN
.DS_Store

9
GME Remit/APIs/Router/APIRouter.swift

@ -75,6 +75,10 @@ enum APIRouter {
case fetchInboundAccounts
case fetchInboundTransactionHistory(from: String, to: String)
case deleteInboundAccount(model: InboundAccount)
// MARK: - New Registration
case loadKYCInformation
}
// MARK: - Request
@ -486,6 +490,9 @@ extension APIRouter {
case .deleteInboundAccount(let model):
let senderId = GMEDB.shared.user.string(.senderId) ?? ""
return "\(baseUrl)/inbound/mobile/deleteInboundAccount/\(senderId)/\(model.id ?? "")"
case .loadKYCInformation:
let userID = GMEDB.shared.user.string(.userId) ?? ""
return "\(baseUrlWithoutVersion)/v4/Mobile/loadform/\(userID)/kyc"
}
}
}
@ -566,6 +573,8 @@ extension APIRouter {
return .post
case .deleteInboundAccount:
return .post
case .loadKYCInformation:
return .get
}
}

6
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/KYCInfromation.swift

@ -27,8 +27,8 @@ struct KYCInformation: Mappable {
banks <- map["Bank"]
idTypes <- map["IdType"]
branches <- map["Branch"]
personalInformation <- map["PersonalInformation"]
primaryInformation <- map["PrimaryInformation"]
pictures <- map["Pictures"]
personalInformation <- map["personalInformation"]
primaryInformation <- map["primaryInformation"]
pictures <- map["pictures"]
}
}

657
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Service/NewRegisterStep1Service.swift

@ -13,661 +13,6 @@ class NewRegisterStep1Service: NewRegisterStep1ServiceType {
success: @escaping (KYCInformation) -> Void,
failure: @escaping (Error) -> Void
) {
let text =
"""
{
"Id" : "",
"Extra" : "",
"Extra2" : "",
"Data" : {
"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" : "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" : "21",
"text" : "Woori Bank"
}
],
"IdType" : [
{
"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" : "2087",
"text" : "Ansan"
},
{
"id" : "404520",
"text" : "DDM CIS"
},
{
"id" : "1034",
"text" : "Dongdaemun"
},
{
"id" : "2089",
"text" : "Gimhae"
},
{
"id" : "601326",
"text" : "Gwangju"
},
{
"id" : "1035",
"text" : "Hwaseong"
},
{
"id" : "404519",
"text" : "Hyehwa"
},
{
"id" : "585219",
"text" : "Mongol Town"
},
{
"id" : "221269",
"text" : "Songu-ri"
}
],
"PersonalInformation": {
"fullName": "JAMES KIM",
"gender": "M",
"dob": "1988-03-01",
"email": "jamesk@gmeremit.com",
"city": "Seoul",
"address": "Jongro 32 Jonro gu"
},
"PrimaryInformation": null,
"Pictures": null
},
"ErrorCode" : "0",
"Msg" : "success"
}
"""
guard
let json = ResponseContainerObject<KYCInformation>(JSONString: text)?.data
else {
let error = NSError(domain: "TEST", code: 0, message: "JSON ERROR")
failure(error)
return
}
success(json)
APIRouter.loadKYCInformation.json(success: success, failure: failure)
}
}

2
GME Remit/MultiLanguages/ur-PK.lproj/Localizable.strings

@ -494,7 +494,7 @@
"address_text" = "پتہ";
"relation_text" = "تعلق";
"reason_text" = "منتقلی کی وجہ";
"payout_country_placeholder_text" = "ادائیگی کا ملک منتخب کریں";
"country_placeholder_text" = "ادائیگی کا ملک منتخب کریں";
"native_country_placeholder_text" = "وصول کنندہ کا آبائی ملک منتخب کریں";
"payment_mode_placeholder_text" = "ادائیگی کا طریقہ منتخب کریں";
"bank_placeholder_text" = "بینک منتخب کریں";

41
GME Remit/Utilities/HotLine/Application Logic/Service/HotLineService.swift

@ -20,7 +20,7 @@ class HotLineService: HotLineServiceType {
{
"countryName": "Nepal",
"countryCode": "np",
"remitPhoneNumberNumber": "1811-2934",
"remitPhoneNumber": "1811-2934",
"remitFacebookURL": "https://www.facebook.com/gmenepal/",
"loanPhoneNumber": "010-6584-6864",
"loanFacebookURL": "https://www.facebook.com/gmeloannepal/"
@ -170,7 +170,7 @@ class HotLineService: HotLineServiceType {
{
"countryName": "Nepal",
"countryCode": "np",
"remitPhoneNumberNumber": "1811-2934",
"remitPhoneNumber": "1811-2934",
"remitFacebookURL": "https://www.facebook.com/gmenepal/",
"loanPhoneNumber": "010-6584-6864",
"loanFacebookURL": "https://www.facebook.com/gmeloannepal/"
@ -270,12 +270,45 @@ class HotLineService: HotLineServiceType {
"remitFacebookURL": "https://www.facebook.com/GME-Remittance-Myanmar-295378281070768/",
"loanPhoneNumber": "1811-2938",
"loanFacebookURL": "https://www.facebook.com/GME-Loan-Myanmar-1065401266975499/"
},
{
"countryName": "Kazakhstan",
"countryCode": "kz",
"remitPhoneNumber": "010-2960-6864",
"remitFacebookURL": "https://www.facebook.com/gmerussia/",
"loanPhoneNumber": "010-2960-6864",
"loanFacebookURL": "https://www.facebook.com/GME-Loan-Uzbekistan-307204249997604/"
},
{
"countryName": "Russian Federation",
"countryCode": "ru",
"remitPhoneNumber": "010-2960-6864",
"remitFacebookURL": "https://www.facebook.com/gmerussia/",
"loanPhoneNumber": "010-2960-6864",
"loanFacebookURL": "https://www.facebook.com/GME-Loan-Uzbekistan-307204249997604/"
},
{
"countryName": "Tajikistan",
"countryCode": "tj",
"remitPhoneNumber": "010-2960-6864",
"remitFacebookURL": "https://www.facebook.com/gmerussia/",
"loanPhoneNumber": "010-2960-6864",
"loanFacebookURL": "https://www.facebook.com/GME-Loan-Uzbekistan-307204249997604/"
},
{
"countryName": "Kyrgyzstan",
"countryCode": "kg",
"remitPhoneNumber": "010-2968-6864",
"remitFacebookURL": "https://www.facebook.com/gmerussia/",
"loanPhoneNumber": "010-2968-6864",
"loanFacebookURL": "https://www.facebook.com/GME-Loan-Uzbekistan-307204249997604/"
}
]
}
"""
let hotLineContainer = HotLineContainer(JSONString: testInput)
return hotLineContainer?.data
let hotLineContainer = HotLineContainer(JSONString: testInput)
return hotLineContainer?.data
}
}

2
GME Remit/Utilities/TablePresenter/User Interface/View/TablePresenter.storyboard

@ -143,7 +143,7 @@
<constraint firstAttribute="width" secondItem="dLg-4E-6az" secondAttribute="height" multiplier="4:3" id="z1Q-3T-hlB"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Cell Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="J9n-Ka-9S8">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Cell Title" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.80000000000000004" translatesAutoresizingMaskIntoConstraints="NO" id="J9n-Ka-9S8">
<rect key="frame" x="63.5" y="0.0" width="251.5" height="40"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="16"/>

20
GME RemitTests/APITest.swift

@ -296,7 +296,25 @@ class APITest: XCTestCase {
wait(for: [expt], timeout: 5.0)
}
func testTotalAccounts() {
func testLoadFormKYC() {
let service = NewRegisterStep1Service()
let expt = expectation(description: "testLoadFormKYC")
server = .uat
service.fetchInformation(
success: {
XCTAssert($0.cities?.count != 0 , "cities data is wrong")
XCTAssert($0.idTypes?.count != 0 , "idTypes data is wrong")
XCTAssert($0.branches?.count != 0 , "branches data is wrong")
XCTAssert($0.banks?.count != 0 , "banks data is wrong")
expt.fulfill()
},
failure: {
XCTAssert(false, $0.localizedDescription)
expt.fulfill()
}
)
wait(for: [expt], timeout: 5.0)
}
}
Loading…
Cancel
Save