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