|
|
@ -20,7 +20,7 @@ protocol FetchSendMoneyPaymentModeService: ApiServiceType { |
|
|
|
// fetch paymentModeServcie |
|
|
|
extension FetchSendMoneyPaymentModeService { |
|
|
|
func fetchInformations(countryCode: String, id: String? , success: @escaping (SendMoneyPaymentModel?) -> (), failure: @escaping (Error) -> ()) { |
|
|
|
let url = baseUrl + "mobile/sendmoney/load/\(countryCode)/?receiver=\(id ?? "")" |
|
|
|
let url = oldBaseUrl + "mobile/sendmoney/load/\(countryCode)/?receiver=\(id ?? "")" |
|
|
|
auth.request(method: .post, url: url, params: nil, success: { (response: SendMoneyPaymentModelContainer) in |
|
|
|
if (response.errorCode ?? "") == "1" { |
|
|
|
let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]) |
|
|
@ -43,7 +43,7 @@ protocol FetchBankBranchService: ApiServiceType { |
|
|
|
|
|
|
|
extension FetchBankBranchService { |
|
|
|
func fetchBranch(countryCode: String, bankId: String, branchName: String, success: @escaping ([SendMoneyBankBranch]) -> (), failure: @escaping (Error) -> ()) { |
|
|
|
let url = baseUrl + "mobile/sendmoney/load/branch/" + countryCode + "/" + bankId + "/?search=" + branchName |
|
|
|
let url = oldBaseUrl + "mobile/sendmoney/load/branch/" + countryCode + "/" + bankId + "/?search=" + branchName |
|
|
|
|
|
|
|
self.auth.request(method: .post, url: url, params: nil, success: { (response: SendMoneyBankBranchContainer) in |
|
|
|
if (response.errorCode ?? "") == "1" { |
|
|
@ -66,7 +66,7 @@ protocol ValidateAccountNumberService: ApiServiceType { |
|
|
|
|
|
|
|
extension ValidateAccountNumberService { |
|
|
|
func validate(params: [String: String], success: @escaping () -> (), failure: @escaping (Error) -> ()) { |
|
|
|
let url = baseUrl + "mobile/sendmoney/validation/account" |
|
|
|
let url = oldBaseUrl + "mobile/sendmoney/validation/account" |
|
|
|
|
|
|
|
self.auth.request(method: .post, url: url, params: params, success: { (response: SendMoneyBankBranchContainer) in // can use any container. need to map errorcode and message only |
|
|
|
if (response.errorCode ?? "") == "1" { |
|
|
|