From 209624d5d3b6a3a1a4b6c3880782152afbf2804e Mon Sep 17 00:00:00 2001 From: InKwon James Kim Date: Mon, 3 Jun 2019 14:45:40 +0900 Subject: [PATCH] add new parameters for validate account at SendMoneyPaymentMode --- GMERemittance/AppDelegate.swift | 2 +- .../Model/SendMoneyAccountValidationRequestModel.swift | 3 +++ .../Presenter/SendMoneyPaymentModePresenter.swift | 8 ++++++-- .../User Interface/View/SendMoneyPaymentMode.storyboard | 4 ++-- .../View/SendMoneyPaymentModeViewController.swift | 5 +++++ 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/GMERemittance/AppDelegate.swift b/GMERemittance/AppDelegate.swift index 3fb49c4e..41003033 100644 --- a/GMERemittance/AppDelegate.swift +++ b/GMERemittance/AppDelegate.swift @@ -20,7 +20,7 @@ import IQKeyboardManagerSwift import LGSideMenuController import Localize_Swift -let server: Server = .live +let server: Server = .stagging var overlayView: UIView? @UIApplicationMain diff --git a/GMERemittance/Model/SendMoneyAccountValidationRequestModel.swift b/GMERemittance/Model/SendMoneyAccountValidationRequestModel.swift index 087644a0..1d443fce 100644 --- a/GMERemittance/Model/SendMoneyAccountValidationRequestModel.swift +++ b/GMERemittance/Model/SendMoneyAccountValidationRequestModel.swift @@ -37,4 +37,7 @@ class SendMoneyAccountValidationRequestModel { var bankCode: String? var payoutPartner: String? var processId :String? + var BankId: String? + var ReceiverCountryId: String? + var deliveryMethodId: String? } diff --git a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/Presenter/SendMoneyPaymentModePresenter.swift b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/Presenter/SendMoneyPaymentModePresenter.swift index 97e1b5a9..15a2d31a 100644 --- a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/Presenter/SendMoneyPaymentModePresenter.swift +++ b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/Presenter/SendMoneyPaymentModePresenter.swift @@ -29,7 +29,7 @@ extension SendMoneyPaymentModePresenter: SendMoneyPaymentModeModuleInterface { } func validate(model: SendMoneyAccountValidationRequestModel) { - + view?.showLoading() let params: [String: String] = [ "IdType" : model.idType ?? "", @@ -45,7 +45,10 @@ extension SendMoneyPaymentModePresenter: SendMoneyPaymentModeModuleInterface { "BankCode": model.bankCode ?? "", "Amount": model.amount ?? "", "PayoutPartner": model.payoutPartner ?? "", - "ProcessId": model.processId ?? "" + "ProcessId": model.processId ?? "", + "BankId": model.BankId ?? "", + "ReceiverCountryId": model.ReceiverCountryId ?? "", + "deliveryMethodId": model.deliveryMethodId ?? "" ] self.interactor?.validateAccountNumber(params: params) @@ -67,6 +70,7 @@ extension SendMoneyPaymentModePresenter: SendMoneyPaymentModeInteractorOutput { } func success() { + view?.hideLoading() self.view?.success() } } diff --git a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentMode.storyboard b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentMode.storyboard index 2be7dcab..f23db2c3 100644 --- a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentMode.storyboard +++ b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentMode.storyboard @@ -192,11 +192,11 @@ - + - + diff --git a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift index 7a4dc010..18083734 100644 --- a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift +++ b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift @@ -219,6 +219,11 @@ class SendMoneyPaymentModeViewController: UIViewController { validationRequest.payoutPartner = self.selectedPayoutMode?.payoutPartner validationRequest.amount = "10000.0" validationRequest.processId = "" + validationRequest.BankId = self.selectedBank?.id + validationRequest.ReceiverCountryId = self.recipient?.countryId + validationRequest.deliveryMethodId = self.selectedPayoutMode?.id + //TODO + callingApi = true self.presenter?.validate(model: validationRequest) }