Browse Source

account validation request managed

pull/1/head
gme_2 6 years ago
parent
commit
041e64def9
  1. 7
      GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift

7
GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift

@ -99,6 +99,7 @@ class SendMoneyPaymentModeViewController: UIViewController {
// if bank validate bank, if branch validate branch if account validate account
var shouldGoNextPage = true
var callingApi = false
var errors = ""
if shouldValidateBank() {
let bank = bankTextField.text!
@ -119,8 +120,6 @@ class SendMoneyPaymentModeViewController: UIViewController {
shouldGoNextPage = false
errors = errors + " " + Constants.validationErrorMessageAccountNumber
}else {
// IdType, IdNumber CustomerFirstName CustomerLastName ReceiverFirstName ReceiverLastName Country AccountType IssuerCode AccountNo
// Amount BankCode PayoutPartner ProcessId
let validationRequest = SendMoneyAccountValidationRequestModel()
validationRequest.idType = ""
validationRequest.idNumber = ""
@ -136,7 +135,7 @@ class SendMoneyPaymentModeViewController: UIViewController {
validationRequest.bankCode = self.selectedBank?.id
validationRequest.payoutPartner = self.selectedPayoutMode?.payoutPartner
validationRequest.processId = ""
callingApi = true
self.presenter?.validate(model: validationRequest)
}
}
@ -144,12 +143,14 @@ class SendMoneyPaymentModeViewController: UIViewController {
}
}
if !callingApi {
if shouldGoNextPage {
proceedToNextPage()
}else {
self.show(error: errors)
}
}
}
// MARK: Other Functions

Loading…
Cancel
Save