Browse Source

1. added Live Test

2. changed authorization at add account api
3. changed name logic at validation account in setup recipient
4. add access-code api after customer registration
5. add multi language types
pull/1/head
InKwon James Kim 5 years ago
parent
commit
9f37b3cc20
  1. 1
      GME Remit/APIs/RestApiManager.swift
  2. 4
      GME Remit/APIs/UrlManager.swift
  3. 4
      GME Remit/Modules/ManageAccountsModules/AutoDebitModules/AddAccount/User Interface/View/AddAccountViewController.swift
  4. 5
      GME Remit/Modules/ManageAgreement/Application Logic/Service/ManageAgreementService.swift
  5. 12
      GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/View/ViewModel/SetupRecipientViewModel.swift
  6. 17
      GME Remit/Modules/RegisterModules/Register/Application Logic/Interactor/RegisterInteractor.swift
  7. 17
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1ViewController.swift
  8. 7
      GME Remit/MultiLanguages/en.lproj/Localizable.strings
  9. 7
      GME Remit/MultiLanguages/si.lproj/Localizable.strings

1
GME Remit/APIs/RestApiManager.swift

@ -14,6 +14,7 @@ import Localize_Swift
enum Server: String {
case live
case testLive
case staging
case uat2
case uat

4
GME Remit/APIs/UrlManager.swift

@ -38,6 +38,8 @@ class UrlManager {
self.baseURL = "http://gmeuat.gmeremit.com:5008/api/"
case .ngrok:
self.baseURL = justinServer
case .testLive:
self.baseURL = "http://livetest.gmeremit.com:8012/api/"
}
}
@ -55,6 +57,8 @@ class UrlManager {
self.baseURL = "http://gmeuat.gmeremit.com:5008/api/"
case .ngrok:
self.baseURL = justinServer
case .testLive:
self.baseURL = "http://livetest.gmeremit.com:8012/api/"
}
}
}

4
GME Remit/Modules/ManageAccountsModules/AutoDebitModules/AddAccount/User Interface/View/AddAccountViewController.swift

@ -121,7 +121,7 @@ The bank you entered cannot be used. For the detail, please call us.
@IBAction private func verifyAccountButtonTouch(_ sender: UIButton) {
presenter?.verifyAccount(
needsAuthorization: delegate == nil ? true : false,
needsAuthorization: true, //delegate == nil ? true : false,
customerID: GMEDB.shared.user.string(.senderId) ?? "", // senderID
bankCode: selectedBank?.bankCode ?? "",
accountNumber: accountTextField.text ?? "")
@ -136,7 +136,7 @@ The bank you entered cannot be used. For the detail, please call us.
private func setup() {
// all setup should be done here
presenter?.viewIsReady(needsAuthorization: delegate == nil ? true : false)
presenter?.viewIsReady(needsAuthorization: true)//delegate == nil ? true : false)
verifyAccountButton.layer.cornerRadius = 5
setValidTextField()
setMultilanguage()

5
GME Remit/Modules/ManageAgreement/Application Logic/Service/ManageAgreementService.swift

@ -21,6 +21,9 @@ class ManageAgreementService: ManageAgreementServiceType {
success: @escaping () -> Void,
failure: @escaping (Error) -> Void
) {
APIRouter.customerInfoAgree(flag).json(success: success, failure: failure)
// APIRouter.customerInfoAgree(flag).json(success: success, failure: failure)
// FIXME:
success()
}
}

12
GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/View/ViewModel/SetupRecipientViewModel.swift

@ -230,8 +230,18 @@ class SetupRecipientViewModel: ViewModelType {
let firstName = recipient.firstName,
let lastName = recipient.lastName else { return }
let name: String
if firstName == "" {
name = recipient.fullName ?? ""
} else if let middleName = recipient.middleName, middleName != "" {
name = "\(firstName) \(middleName)"
} else {
name = firstName
}
let validateModel = ValidateAccountRequest(
firstName: (firstName == "") ? (recipient.fullName ?? "") : firstName,
firstName: name,
lastName: lastName,
accountType: "1",
accountNumber: recipient.agent?.accountNumber ?? "",

17
GME Remit/Modules/RegisterModules/Register/Application Logic/Interactor/RegisterInteractor.swift

@ -30,8 +30,21 @@ extension RegisterInteractor: RegisterInteractorInput {
model: model,
token: token ?? "",
success: { (message) in
self.output?.success(message: message ?? "")
},
let loginService = LoginService()
loginService.accessCode(
userId: model.username ?? "",
password: model.encryptedPassword ?? "",
success: { user in
GMEDB.shared.user.set(user?.accessCode, .accessCode)
self.output?.success(message: message ?? "")
},
failure: {
self.output?.show(error: $0)
}
)
},
failure: {self.output?.show(error: $0)}
)
}

17
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1ViewController.swift

@ -272,6 +272,21 @@ extension NewRegisterStep1ViewController {
return
}
switch idType.id ?? "8008"{
case "8008":
self?.anotherIDImageLabel.text = "national_id_text".localized()
self?.idNumberTextField.errorMessage = "national_id_number_error_text".localized()
case "11012":
self?.anotherIDImageLabel.text = "driving_id_text".localized()
self?.idNumberTextField.errorMessage = "driving_id_number_error_text".localized()
case "1302":
self?.anotherIDImageLabel.text = "alien_id_text".localized()
self?.idNumberTextField.errorMessage = "alien_id_number_error_text".localized()
default:
self?.anotherIDImageLabel.text = "id_type_text".localized()
self?.idNumberTextField.errorMessage = "another_id_number_error_text".localized()
}
self?.anotherIDImageContainerView.isHidden = false
self?.idNumberTextField.validCondition = { !$0.isEmpty && $0.count == 14 }
@ -760,7 +775,7 @@ extension NewRegisterStep1ViewController {
idIssueDateTextField.placeholder = "another_id_issue_date_text".localized()
idExpiryDateTextField.placeholder = "another_id_expiry_date_text".localized()
idNumberTextField.errorMessage = "Invalid ID number".localized()
idNumberTextField.errorMessage = "another_id_number_error_text".localized()
anotherIDClearButton.setTitle("clear_text".localized(), for: .normal)

7
GME Remit/MultiLanguages/en.lproj/Localizable.strings

@ -753,6 +753,13 @@
"another_id_issue_date_text" = "ID Issue Date";
"another_id_expiry_date_text" = "ID Expiry Date";
"another_id_number_error_text" = "Invalid ID number";
"alien_id_text" = "Alien Registration Card";
"national_id_text" = "National ID Card";
"driving_id_text" = "Driving License Card";
"driving_id_number_error_text" = "Invalid Driving License number";
"alien_id_number_error_text" = "Invalid Alien Registration number";
"national_id_number_error_text" = "Invalid National ID number";
"select_different_id_type" = "Select different ID Type";
"clear_text" = "Clear";
"additional_information_text" = "Additional Information";
"upload_pictures_text" = "Upload Pictures";

7
GME Remit/MultiLanguages/si.lproj/Localizable.strings

@ -34,7 +34,7 @@
"dob_valid_error" = "කරුණාකර නිවැරදි උපන් දිනයක් ඇතුලත් කරන්න.";
"forgot_password_title_text" = "ඔබගේ මුරපදය සඳහා උදවු අවශ්‍යද?";
"reset_text" = "නැවත පෙර තත්වයට";
"reset_text" = "රීසෙට් කරන්න";
"kyc_fill_text" = "ඔබගේ ගිණුම ස්තීර කරන්න";
"kyc_verify_pending_text" = "ස්තීර කිරීමේ ක්‍රියාවලිය";
"penny_test_pending_text" = "ලියාපදිංචි වීමේ ක්‍රියාවලිය දිගටම පවත්වාගෙන යන්න";
@ -739,9 +739,8 @@
"agree_text" = "එකඟයි";
// New Registration
"new_registration_title_text" = "ලියාපදිංචි වීම සඳහා ඔබ ගැන අපට කියන්න";
"step1_sub_title_text" = "ඔබගේ තොරතුරු";
"new_registration_title_text" = "ලියාපදිංචි ක්‍රියාවලිය";
"step1_sub_title_text" = "පෞද්ගලික තොරතුරු";
"step2_sub_title_text" = "ඔටෝ ඩෙබිට් සඳහා ලියාපදිංචි කරන්න";
"step3_sub_title_text" = "ගිණුම සත්‍යාපනය කරන්න";

Loading…
Cancel
Save