|
|
@ -8,359 +8,330 @@ |
|
|
|
|
|
|
|
import Foundation |
|
|
|
|
|
|
|
/* |
|
|
|
case "BY": |
|
|
|
return R.drawable.flag_belarus; |
|
|
|
*/ |
|
|
|
|
|
|
|
//Country Default Receiving Amount |
|
|
|
//azerbaijan 1,000 |
|
|
|
//Bangladesh 100,000 |
|
|
|
//Belarus 1,000 |
|
|
|
//Cambodia 500 |
|
|
|
//Georgia 1,000 |
|
|
|
//India 100,000 |
|
|
|
//Indonesia 15,000,000 |
|
|
|
//Kazakhstan 1,000 |
|
|
|
//Kyrgyzstan 1,000 |
|
|
|
//Malaysia 10,000 |
|
|
|
//Moldova 1,000 |
|
|
|
//Mongolia(USD) 1,000 |
|
|
|
//Mongolia(MNT) 2,000,000 |
|
|
|
//Myanmar 1,500,000 |
|
|
|
//Nepal 100,000 |
|
|
|
//Pakistan 100,000 |
|
|
|
//Philippines 500 |
|
|
|
//Russian Federation 1,000 |
|
|
|
//Singapore 2,000 |
|
|
|
//Sri Lanka(LKR) 100,000 |
|
|
|
//Sri Lanka(USD) 1,000 |
|
|
|
//Tajikistan 1,000 |
|
|
|
//Thailand(THB) 30,000 |
|
|
|
//Uzbekistan 1,000 |
|
|
|
//Vietnam(VND) 50,000,000 |
|
|
|
//Vietnam(USD) 2,000 |
|
|
|
|
|
|
|
|
|
|
|
class CountryInfo { |
|
|
|
private var flag: [String: UIImage] = |
|
|
|
[ |
|
|
|
"mm": #imageLiteral(resourceName: "flag_myanmar"), |
|
|
|
"bs": #imageLiteral(resourceName: "flag_bahamas"), |
|
|
|
"bo": #imageLiteral(resourceName: "flag_bolivia"), |
|
|
|
"jo": #imageLiteral(resourceName: "flag_jordan"), |
|
|
|
"cl": #imageLiteral(resourceName: "flag_chile"), |
|
|
|
"fr": #imageLiteral(resourceName: "flag_france"), |
|
|
|
"sa": #imageLiteral(resourceName: "flag_saudi_arabia"), |
|
|
|
"mu": #imageLiteral(resourceName: "flag_mauritius"), |
|
|
|
"kz": #imageLiteral(resourceName: "flag_kazakhstan"), |
|
|
|
"tr": #imageLiteral(resourceName: "flag_turkey"), |
|
|
|
"sn": #imageLiteral(resourceName: "flag_senegal"), |
|
|
|
"hk": #imageLiteral(resourceName: "flag_hong_kong"), |
|
|
|
"fj": #imageLiteral(resourceName: "flag_fiji"), |
|
|
|
"cz": #imageLiteral(resourceName: "flag_czech_republic"), |
|
|
|
"nu": #imageLiteral(resourceName: "flag_niue"), |
|
|
|
"jm": #imageLiteral(resourceName: "flag_jamaica"), |
|
|
|
"gg": #imageLiteral(resourceName: "flag_guernsey"), |
|
|
|
"ph": #imageLiteral(resourceName: "flag_philippines"), |
|
|
|
"bv": #imageLiteral(resourceName: "flag_bouvet_island"), |
|
|
|
"yt": #imageLiteral(resourceName: "flag_mayotte"), |
|
|
|
"bd": #imageLiteral(resourceName: "flag_bangladesh"), |
|
|
|
"tj": #imageLiteral(resourceName: "flag_tajikistan"), |
|
|
|
"bg": #imageLiteral(resourceName: "flag_bulgaria"), |
|
|
|
"hn": #imageLiteral(resourceName: "flag_honduras"), |
|
|
|
"bn": #imageLiteral(resourceName: "flag_brunei"), |
|
|
|
"gn": #imageLiteral(resourceName: "flag_guinea"), |
|
|
|
"ai": #imageLiteral(resourceName: "flag_anguilla"), |
|
|
|
"cv": #imageLiteral(resourceName: "flag_cape_verde"), |
|
|
|
"et": #imageLiteral(resourceName: "flag_ethiopia"), |
|
|
|
"sg": #imageLiteral(resourceName: "flag_singapore"), |
|
|
|
"dk": #imageLiteral(resourceName: "flag_denmark"), |
|
|
|
"dj": #imageLiteral(resourceName: "flag_djibouti"), |
|
|
|
"nr": #imageLiteral(resourceName: "flag_nauru"), |
|
|
|
"sb": #imageLiteral(resourceName: "flag_solomon_islands"), |
|
|
|
"so": #imageLiteral(resourceName: "flag_somalia"), |
|
|
|
"gi": #imageLiteral(resourceName: "flag_gibraltar"), |
|
|
|
"gf": #imageLiteral(resourceName: "flag_french_guiana"), |
|
|
|
"gh": #imageLiteral(resourceName: "flag_ghana"), |
|
|
|
"mt": #imageLiteral(resourceName: "flag_malta"), |
|
|
|
"gm": #imageLiteral(resourceName: "flag_gambia"), |
|
|
|
"ck": #imageLiteral(resourceName: "flag_cook_islands"), |
|
|
|
"sl": #imageLiteral(resourceName: "flag_sierra_leone"), |
|
|
|
"li": #imageLiteral(resourceName: "flag_liechtenstein"), |
|
|
|
"ls": #imageLiteral(resourceName: "flag_lesotho"), |
|
|
|
"fm": #imageLiteral(resourceName: "flag_micronesia"), |
|
|
|
"nl": #imageLiteral(resourceName: "flag_netherlands"), |
|
|
|
"gd": #imageLiteral(resourceName: "flag_grenada"), |
|
|
|
"cx": #imageLiteral(resourceName: "flag_christmas_island"), |
|
|
|
"qa": #imageLiteral(resourceName: "flag_qatar"), |
|
|
|
"vn": #imageLiteral(resourceName: "flag_vietnam"), |
|
|
|
"au": #imageLiteral(resourceName: "flag_australia"), |
|
|
|
"la": #imageLiteral(resourceName: "flag_laos"), |
|
|
|
"dm": #imageLiteral(resourceName: "flag_dominica"), |
|
|
|
"tt": #imageLiteral(resourceName: "flag_trinidad_and_tobago"), |
|
|
|
"mq": #imageLiteral(resourceName: "flag_martinique"), |
|
|
|
"sv": #imageLiteral(resourceName: "flag_el_salvador"), |
|
|
|
"mr": #imageLiteral(resourceName: "flag_mauritania"), |
|
|
|
"pw": #imageLiteral(resourceName: "flag_palau"), |
|
|
|
"be": #imageLiteral(resourceName: "flag_belgium"), |
|
|
|
"ve": #imageLiteral(resourceName: "flag_venezuela"), |
|
|
|
"as": #imageLiteral(resourceName: "flag_american_samoa"), |
|
|
|
"zm": #imageLiteral(resourceName: "flag_zambia"), |
|
|
|
"mx": #imageLiteral(resourceName: "flag_mexico"), |
|
|
|
"jp": #imageLiteral(resourceName: "flag_japan"), |
|
|
|
"th": #imageLiteral(resourceName: "flag_thailand"), |
|
|
|
"za": #imageLiteral(resourceName: "flag_south_africa"), |
|
|
|
"tg": #imageLiteral(resourceName: "flag_togo"), |
|
|
|
"sr": #imageLiteral(resourceName: "flag_suriname"), |
|
|
|
"pf": #imageLiteral(resourceName: "flag_french_polynesia"), |
|
|
|
"dz": #imageLiteral(resourceName: "flag_algeria"), |
|
|
|
"az": #imageLiteral(resourceName: "flag_azerbaijan"), |
|
|
|
"bz": #imageLiteral(resourceName: "flag_belize"), |
|
|
|
"at": #imageLiteral(resourceName: "flag_austria"), |
|
|
|
"pr": #imageLiteral(resourceName: "flag_puerto_rico"), |
|
|
|
"ec": #imageLiteral(resourceName: "flag_ecuador"), |
|
|
|
"ws": #imageLiteral(resourceName: "flag_samoa"), |
|
|
|
"ag": #imageLiteral(resourceName: "flag_antigua_and_barbuda"), |
|
|
|
"ne": #imageLiteral(resourceName: "flag_niger"), |
|
|
|
"si": #imageLiteral(resourceName: "flag_slovenia"), |
|
|
|
"lr": #imageLiteral(resourceName: "flag_liberia"), |
|
|
|
"wf": #imageLiteral(resourceName: "flag_wallis_and_futuna"), |
|
|
|
"kg": #imageLiteral(resourceName: "flag_kyrgyzstan"), |
|
|
|
"pm": #imageLiteral(resourceName: "flag_saint_pierre_and_miquelon"), |
|
|
|
"bi": #imageLiteral(resourceName: "flag_burundi"), |
|
|
|
"co": #imageLiteral(resourceName: "flag_colombia"), |
|
|
|
"gu": #imageLiteral(resourceName: "flag_guam"), |
|
|
|
"bw": #imageLiteral(resourceName: "flag_botswana"), |
|
|
|
"sz": #imageLiteral(resourceName: "flag_swaziland"), |
|
|
|
"im": #imageLiteral(resourceName: "flag_isle_of_man"), |
|
|
|
"je": #imageLiteral(resourceName: "flag_jersey"), |
|
|
|
"ki": #imageLiteral(resourceName: "flag_kiribati"), |
|
|
|
"cr": #imageLiteral(resourceName: "flag_costa_rica"), |
|
|
|
"bb": #imageLiteral(resourceName: "flag_barbados"), |
|
|
|
"mn": #imageLiteral(resourceName: "flag_mongolia"), |
|
|
|
"to": #imageLiteral(resourceName: "flag_tonga"), |
|
|
|
"uk": #imageLiteral(resourceName: "flag_united_kingdom"), |
|
|
|
"id": #imageLiteral(resourceName: "flag_indonesia"), |
|
|
|
"ua": #imageLiteral(resourceName: "flag_ukraine"), |
|
|
|
"kn": #imageLiteral(resourceName: "flag_saint_kitts_and_nevis"), |
|
|
|
"gy": #imageLiteral(resourceName: "flag_guyana"), |
|
|
|
"cn": #imageLiteral(resourceName: "flag_china"), |
|
|
|
"cu": #imageLiteral(resourceName: "flag_cuba"), |
|
|
|
"es": #imageLiteral(resourceName: "flag_spain"), |
|
|
|
"no": #imageLiteral(resourceName: "flag_norway"), |
|
|
|
"ht": #imageLiteral(resourceName: "flag_haiti"), |
|
|
|
"al": #imageLiteral(resourceName: "flag_albania"), |
|
|
|
"mz": #imageLiteral(resourceName: "flag_mozambique"), |
|
|
|
"in": #imageLiteral(resourceName: "flag_india"), |
|
|
|
"br": #imageLiteral(resourceName: "flag_brazil"), |
|
|
|
"bj": #imageLiteral(resourceName: "flag_benin"), |
|
|
|
"se": #imageLiteral(resourceName: "flag_sweden"), |
|
|
|
"pe": #imageLiteral(resourceName: "flag_peru"), |
|
|
|
"cf": #imageLiteral(resourceName: "flag_central_african_republic"), |
|
|
|
"tz": #imageLiteral(resourceName: "flag_tanzania"), |
|
|
|
"uy": #imageLiteral(resourceName: "flag_uruguay"), |
|
|
|
"vu": #imageLiteral(resourceName: "flag_vanuatu"), |
|
|
|
"my": #imageLiteral(resourceName: "flag_malaysia"), |
|
|
|
"md": #imageLiteral(resourceName: "flag_moldova"), |
|
|
|
"gt": #imageLiteral(resourceName: "flag_guatemala"), |
|
|
|
"is": #imageLiteral(resourceName: "flag_iceland"), |
|
|
|
"gr": #imageLiteral(resourceName: "flag_greece"), |
|
|
|
"tw": #imageLiteral(resourceName: "flag_taiwan"), |
|
|
|
"om": #imageLiteral(resourceName: "flag_oman"), |
|
|
|
"pt": #imageLiteral(resourceName: "flag_portugal"), |
|
|
|
"by": #imageLiteral(resourceName: "flag_belarus"), |
|
|
|
"kw": #imageLiteral(resourceName: "flag_kuwait"), |
|
|
|
"gl": #imageLiteral(resourceName: "flag_greenland"), |
|
|
|
"td": #imageLiteral(resourceName: "flag_chad"), |
|
|
|
"na": #imageLiteral(resourceName: "flag_namibia"), |
|
|
|
"ee": #imageLiteral(resourceName: "flag_estonia"), |
|
|
|
"ms": #imageLiteral(resourceName: "flag_montserrat"), |
|
|
|
"mv": #imageLiteral(resourceName: "flag_maldives"), |
|
|
|
"af": #imageLiteral(resourceName: "flag_afghanistan"), |
|
|
|
"nc": #imageLiteral(resourceName: "flag_new_caledonia"), |
|
|
|
"ga": #imageLiteral(resourceName: "flag_gabon"), |
|
|
|
"mo": #imageLiteral(resourceName: "flag_macao"), |
|
|
|
"ni": #imageLiteral(resourceName: "flag_nicaragua"), |
|
|
|
"zw": #imageLiteral(resourceName: "flag_zimbabwe"), |
|
|
|
"bm": #imageLiteral(resourceName: "flag_bermuda"), |
|
|
|
"rs": #imageLiteral(resourceName: "flag_serbia"), |
|
|
|
"cy": #imageLiteral(resourceName: "flag_cyprus"), |
|
|
|
"ao": #imageLiteral(resourceName: "flag_angola"), |
|
|
|
"py": #imageLiteral(resourceName: "flag_paraguay"), |
|
|
|
"tv": #imageLiteral(resourceName: "flag_tuvalu"), |
|
|
|
"mc": #imageLiteral(resourceName: "flag_monaco"), |
|
|
|
"sm": #imageLiteral(resourceName: "flag_san_marino"), |
|
|
|
"er": #imageLiteral(resourceName: "flag_eritrea"), |
|
|
|
"bt": #imageLiteral(resourceName: "flag_bhutan"), |
|
|
|
"ba": #imageLiteral(resourceName: "flag_bosnia_and_herzegovina"), |
|
|
|
"sc": #imageLiteral(resourceName: "flag_seychelles"), |
|
|
|
"mg": #imageLiteral(resourceName: "flag_madagascar"), |
|
|
|
"st": #imageLiteral(resourceName: "flag_sao_tome_and_principe"), |
|
|
|
"eg": #imageLiteral(resourceName: "flag_egypt"), |
|
|
|
"ky": #imageLiteral(resourceName: "flag_cayman_islands"), |
|
|
|
"ug": #imageLiteral(resourceName: "flag_uganda"), |
|
|
|
"sy": #imageLiteral(resourceName: "flag_syria"), |
|
|
|
"cm": #imageLiteral(resourceName: "flag_cameroon"), |
|
|
|
"aq": #imageLiteral(resourceName: "flag_antarctica"), |
|
|
|
"tn": #imageLiteral(resourceName: "flag_tunisia"), |
|
|
|
"ge": #imageLiteral(resourceName: "flag_georgia"), |
|
|
|
"it": #imageLiteral(resourceName: "flag_italy"), |
|
|
|
"gq": #imageLiteral(resourceName: "flag_equatorial_guinea"), |
|
|
|
"ca": #imageLiteral(resourceName: "flag_canada"), |
|
|
|
"am": #imageLiteral(resourceName: "flag_armenia"), |
|
|
|
"rw": #imageLiteral(resourceName: "flag_rwanda"), |
|
|
|
"bf": #imageLiteral(resourceName: "flag_burkina_faso"), |
|
|
|
"fo": #imageLiteral(resourceName: "flag_faroe_islands"), |
|
|
|
"aw": #imageLiteral(resourceName: "flag_aruba"), |
|
|
|
"fi": #imageLiteral(resourceName: "flag_finland"), |
|
|
|
"lv": #imageLiteral(resourceName: "flag_latvia"), |
|
|
|
"lt": #imageLiteral(resourceName: "flag_lithuania"), |
|
|
|
"np": #imageLiteral(resourceName: "flag_nepal"), |
|
|
|
"pg": #imageLiteral(resourceName: "flag_papua_new_guinea"), |
|
|
|
"ad": #imageLiteral(resourceName: "flag_andorra"), |
|
|
|
"me": #imageLiteral(resourceName: "flag_montenegro"), |
|
|
|
"pa": #imageLiteral(resourceName: "flag_panama"), |
|
|
|
"kh": #imageLiteral(resourceName: "flag_cambodia"), |
|
|
|
"ma": #imageLiteral(resourceName: "flag_morocco"), |
|
|
|
"lb": #imageLiteral(resourceName: "flag_lebanon"), |
|
|
|
"tk": #imageLiteral(resourceName: "flag_tokelau"), |
|
|
|
"nz": #imageLiteral(resourceName: "flag_new_zealand"), |
|
|
|
"sd": #imageLiteral(resourceName: "flag_sudan"), |
|
|
|
"hu": #imageLiteral(resourceName: "flag_hungary"), |
|
|
|
"iq": #imageLiteral(resourceName: "flag_iraq"), |
|
|
|
"hr": #imageLiteral(resourceName: "flag_croatia"), |
|
|
|
"ch": #imageLiteral(resourceName: "flag_switzerland"), |
|
|
|
"do": #imageLiteral(resourceName: "flag_dominican_republic"), |
|
|
|
"mk": #imageLiteral(resourceName: "flag_macedonia"), |
|
|
|
"ng": #imageLiteral(resourceName: "flag_nigeria"), |
|
|
|
"lu": #imageLiteral(resourceName: "flag_luxembourg"), |
|
|
|
"pk": #imageLiteral(resourceName: "flag_pakistan"), |
|
|
|
"ro": #imageLiteral(resourceName: "flag_romania"), |
|
|
|
"ar": #imageLiteral(resourceName: "flag_argentina"), |
|
|
|
"de": #imageLiteral(resourceName: "flag_germany"), |
|
|
|
"km": #imageLiteral(resourceName: "flag_comoros"), |
|
|
|
"sk": #imageLiteral(resourceName: "flag_slovakia"), |
|
|
|
"ke": #imageLiteral(resourceName: "flag_kenya"), |
|
|
|
"ml": #imageLiteral(resourceName: "flag_mali"), |
|
|
|
"ye": #imageLiteral(resourceName: "flag_yemen"), |
|
|
|
"il": #imageLiteral(resourceName: "flag_israel"), |
|
|
|
"ae": #imageLiteral(resourceName: "flag_united_arab_emirates"), |
|
|
|
"eh": #imageLiteral(resourceName: "flag_western_sahara"), |
|
|
|
"io": #imageLiteral(resourceName: "flag_british_indian_ocean_territory"), |
|
|
|
"mw": #imageLiteral(resourceName: "flag_malawi"), |
|
|
|
"lk": #imageLiteral(resourceName: "flag_sri_lanka"), |
|
|
|
"bh": #imageLiteral(resourceName: "flag_bahrain"), |
|
|
|
"nf": #imageLiteral(resourceName: "flag_norfolk_island"), |
|
|
|
"kr": #imageLiteral(resourceName: "flag_south_korea"), |
|
|
|
"uz":#imageLiteral(resourceName: "flag_uzbekistn"), |
|
|
|
"ru":#imageLiteral(resourceName: "flag_russia"), |
|
|
|
"en": #imageLiteral(resourceName: "flag_united_kingdom") |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
var defaultCountries = ["Nepal", "Cambodia", "Philipinnes", "Sri Lanka", "Vietnam", "India", "Pakistan", "azerbaijan", "Bangladesh", "Belarus", "Georgia", "Indonesia", "Kazakhstan", "Kyrgyzstan", "Malaysia", "Moldova", "Mongolia", "Myanmar", "Russian Federation", "Singapore", "Tajikistan", "Thailand", "Uzbekistan"] |
|
|
|
var defaultCountryCodes = ["np", "kh", "ph", "lk", "vn", "in", "pk", "az", "bd", "by", "ge", "kz", "kg", "my", "md", "mn", "mm", "ru", "sg", "tj", "th", "uz", "en"] |
|
|
|
|
|
|
|
private var defaultSendingAmount: [String: String] = |
|
|
|
[ |
|
|
|
"np" : "100000", // nepal |
|
|
|
"kh" : "500", // cambodia |
|
|
|
"ph" : "50000", // philipines |
|
|
|
"lk" : "100,000", // sri lanka |
|
|
|
"vn" : "50000000", // Vietnam |
|
|
|
"in" : "50000", // india |
|
|
|
"pk" : "100000", // pakistan |
|
|
|
"az" : "1000", // azerbaijan |
|
|
|
"bd" : "100000", // Bangladesh |
|
|
|
"by" : "1000", // Belarus |
|
|
|
"ge" : "1000", // Georgia |
|
|
|
// "id" : "1000000", // indonesia |
|
|
|
"kz" : "1000", // Kazakhstan |
|
|
|
"kg" : "1000", // Kyrgyzstan |
|
|
|
"my" : "10000", // Malaysia |
|
|
|
"md" : "1000", // Moldova |
|
|
|
"mn" : "1000", // Mongolia |
|
|
|
"mm" : "1500000", // Myanmar |
|
|
|
"ru" : "1000", // Russian Federation |
|
|
|
"sg" : "2000", // Singapore |
|
|
|
"tj" : "1000", // Tajikistan |
|
|
|
"th" : "30000", // Thailand |
|
|
|
"uz" : "1000", // Uzbekistan |
|
|
|
"default": "1000000" |
|
|
|
] |
|
|
|
|
|
|
|
private var defaultSendingCurrency: [String: String] = |
|
|
|
[ |
|
|
|
"np" : "NPR", // nepal |
|
|
|
"kh" : "USD", // cambodia |
|
|
|
"ph" : "PHP", // philipines |
|
|
|
"lk" : "LKR", // sri lanka |
|
|
|
"vn" : "VND", // vietnam |
|
|
|
"in" : "INR", // india |
|
|
|
"pk" : "PKR", // pakistan |
|
|
|
"az" : "USD", // azerbaijan |
|
|
|
"bd" : "USD", // Bangladesh |
|
|
|
"by" : "USD", // Belarus |
|
|
|
"ge" : "USD", // Georgia |
|
|
|
"id" : "IDR", // Indonesia |
|
|
|
"kz" : "USD", // Kazakhstan |
|
|
|
"kg" : "USD", // Kyrgyzstan |
|
|
|
"my" : "MYR", // Malaysia |
|
|
|
"md" : "USD", // Moldova |
|
|
|
"mn" : "USD", // Mongolia |
|
|
|
"mm" : "MMK", // Myanmar |
|
|
|
"ru" : "USD", // Russian Federation |
|
|
|
"sg" : "SGD", // Singapore |
|
|
|
"tj" : "USD", // Tajikistan |
|
|
|
"th" : "THB", // Thailand |
|
|
|
"uz" : "USD", // Uzbekistan |
|
|
|
"default": "KRW" |
|
|
|
] |
|
|
|
|
|
|
|
private var flag: [String: UIImage] = |
|
|
|
[ |
|
|
|
"mm": #imageLiteral(resourceName: "flag_myanmar"), |
|
|
|
"bs": #imageLiteral(resourceName: "flag_bahamas"), |
|
|
|
"bo": #imageLiteral(resourceName: "flag_bolivia"), |
|
|
|
"jo": #imageLiteral(resourceName: "flag_jordan"), |
|
|
|
"cl": #imageLiteral(resourceName: "flag_chile"), |
|
|
|
"fr": #imageLiteral(resourceName: "flag_france"), |
|
|
|
"sa": #imageLiteral(resourceName: "flag_saudi_arabia"), |
|
|
|
"mu": #imageLiteral(resourceName: "flag_mauritius"), |
|
|
|
"kz": #imageLiteral(resourceName: "flag_kazakhstan"), |
|
|
|
"tr": #imageLiteral(resourceName: "flag_turkey"), |
|
|
|
"sn": #imageLiteral(resourceName: "flag_senegal"), |
|
|
|
"hk": #imageLiteral(resourceName: "flag_hong_kong"), |
|
|
|
"fj": #imageLiteral(resourceName: "flag_fiji"), |
|
|
|
"cz": #imageLiteral(resourceName: "flag_czech_republic"), |
|
|
|
"nu": #imageLiteral(resourceName: "flag_niue"), |
|
|
|
"jm": #imageLiteral(resourceName: "flag_jamaica"), |
|
|
|
"gg": #imageLiteral(resourceName: "flag_guernsey"), |
|
|
|
"ph": #imageLiteral(resourceName: "flag_philippines"), |
|
|
|
"bv": #imageLiteral(resourceName: "flag_bouvet_island"), |
|
|
|
"yt": #imageLiteral(resourceName: "flag_mayotte"), |
|
|
|
"bd": #imageLiteral(resourceName: "flag_bangladesh"), |
|
|
|
"tj": #imageLiteral(resourceName: "flag_tajikistan"), |
|
|
|
"bg": #imageLiteral(resourceName: "flag_bulgaria"), |
|
|
|
"hn": #imageLiteral(resourceName: "flag_honduras"), |
|
|
|
"bn": #imageLiteral(resourceName: "flag_brunei"), |
|
|
|
"gn": #imageLiteral(resourceName: "flag_guinea"), |
|
|
|
"ai": #imageLiteral(resourceName: "flag_anguilla"), |
|
|
|
"cv": #imageLiteral(resourceName: "flag_cape_verde"), |
|
|
|
"et": #imageLiteral(resourceName: "flag_ethiopia"), |
|
|
|
"sg": #imageLiteral(resourceName: "flag_singapore"), |
|
|
|
"dk": #imageLiteral(resourceName: "flag_denmark"), |
|
|
|
"dj": #imageLiteral(resourceName: "flag_djibouti"), |
|
|
|
"nr": #imageLiteral(resourceName: "flag_nauru"), |
|
|
|
"sb": #imageLiteral(resourceName: "flag_solomon_islands"), |
|
|
|
"so": #imageLiteral(resourceName: "flag_somalia"), |
|
|
|
"gi": #imageLiteral(resourceName: "flag_gibraltar"), |
|
|
|
"gf": #imageLiteral(resourceName: "flag_french_guiana"), |
|
|
|
"gh": #imageLiteral(resourceName: "flag_ghana"), |
|
|
|
"mt": #imageLiteral(resourceName: "flag_malta"), |
|
|
|
"gm": #imageLiteral(resourceName: "flag_gambia"), |
|
|
|
"ck": #imageLiteral(resourceName: "flag_cook_islands"), |
|
|
|
"sl": #imageLiteral(resourceName: "flag_sierra_leone"), |
|
|
|
"li": #imageLiteral(resourceName: "flag_liechtenstein"), |
|
|
|
"ls": #imageLiteral(resourceName: "flag_lesotho"), |
|
|
|
"fm": #imageLiteral(resourceName: "flag_micronesia"), |
|
|
|
"nl": #imageLiteral(resourceName: "flag_netherlands"), |
|
|
|
"gd": #imageLiteral(resourceName: "flag_grenada"), |
|
|
|
"cx": #imageLiteral(resourceName: "flag_christmas_island"), |
|
|
|
"qa": #imageLiteral(resourceName: "flag_qatar"), |
|
|
|
"vn": #imageLiteral(resourceName: "flag_vietnam"), |
|
|
|
"au": #imageLiteral(resourceName: "flag_australia"), |
|
|
|
"la": #imageLiteral(resourceName: "flag_laos"), |
|
|
|
"dm": #imageLiteral(resourceName: "flag_dominica"), |
|
|
|
"tt": #imageLiteral(resourceName: "flag_trinidad_and_tobago"), |
|
|
|
"mq": #imageLiteral(resourceName: "flag_martinique"), |
|
|
|
"sv": #imageLiteral(resourceName: "flag_el_salvador"), |
|
|
|
"mr": #imageLiteral(resourceName: "flag_mauritania"), |
|
|
|
"pw": #imageLiteral(resourceName: "flag_palau"), |
|
|
|
"be": #imageLiteral(resourceName: "flag_belgium"), |
|
|
|
"ve": #imageLiteral(resourceName: "flag_venezuela"), |
|
|
|
"as": #imageLiteral(resourceName: "flag_american_samoa"), |
|
|
|
"zm": #imageLiteral(resourceName: "flag_zambia"), |
|
|
|
"mx": #imageLiteral(resourceName: "flag_mexico"), |
|
|
|
"jp": #imageLiteral(resourceName: "flag_japan"), |
|
|
|
"th": #imageLiteral(resourceName: "flag_thailand"), |
|
|
|
"za": #imageLiteral(resourceName: "flag_south_africa"), |
|
|
|
"tg": #imageLiteral(resourceName: "flag_togo"), |
|
|
|
"sr": #imageLiteral(resourceName: "flag_suriname"), |
|
|
|
"pf": #imageLiteral(resourceName: "flag_french_polynesia"), |
|
|
|
"dz": #imageLiteral(resourceName: "flag_algeria"), |
|
|
|
"az": #imageLiteral(resourceName: "flag_azerbaijan"), |
|
|
|
"bz": #imageLiteral(resourceName: "flag_belize"), |
|
|
|
"at": #imageLiteral(resourceName: "flag_austria"), |
|
|
|
"pr": #imageLiteral(resourceName: "flag_puerto_rico"), |
|
|
|
"ec": #imageLiteral(resourceName: "flag_ecuador"), |
|
|
|
"ws": #imageLiteral(resourceName: "flag_samoa"), |
|
|
|
"ag": #imageLiteral(resourceName: "flag_antigua_and_barbuda"), |
|
|
|
"ne": #imageLiteral(resourceName: "flag_niger"), |
|
|
|
"si": #imageLiteral(resourceName: "flag_slovenia"), |
|
|
|
"lr": #imageLiteral(resourceName: "flag_liberia"), |
|
|
|
"wf": #imageLiteral(resourceName: "flag_wallis_and_futuna"), |
|
|
|
"kg": #imageLiteral(resourceName: "flag_kyrgyzstan"), |
|
|
|
"pm": #imageLiteral(resourceName: "flag_saint_pierre_and_miquelon"), |
|
|
|
"bi": #imageLiteral(resourceName: "flag_burundi"), |
|
|
|
"co": #imageLiteral(resourceName: "flag_colombia"), |
|
|
|
"gu": #imageLiteral(resourceName: "flag_guam"), |
|
|
|
"bw": #imageLiteral(resourceName: "flag_botswana"), |
|
|
|
"sz": #imageLiteral(resourceName: "flag_swaziland"), |
|
|
|
"im": #imageLiteral(resourceName: "flag_isle_of_man"), |
|
|
|
"je": #imageLiteral(resourceName: "flag_jersey"), |
|
|
|
"ki": #imageLiteral(resourceName: "flag_kiribati"), |
|
|
|
"cr": #imageLiteral(resourceName: "flag_costa_rica"), |
|
|
|
"bb": #imageLiteral(resourceName: "flag_barbados"), |
|
|
|
"mn": #imageLiteral(resourceName: "flag_mongolia"), |
|
|
|
"to": #imageLiteral(resourceName: "flag_tonga"), |
|
|
|
"uk": #imageLiteral(resourceName: "flag_united_kingdom"), |
|
|
|
"id": #imageLiteral(resourceName: "flag_indonesia"), |
|
|
|
"ua": #imageLiteral(resourceName: "flag_ukraine"), |
|
|
|
"kn": #imageLiteral(resourceName: "flag_saint_kitts_and_nevis"), |
|
|
|
"gy": #imageLiteral(resourceName: "flag_guyana"), |
|
|
|
"cn": #imageLiteral(resourceName: "flag_china"), |
|
|
|
"cu": #imageLiteral(resourceName: "flag_cuba"), |
|
|
|
"es": #imageLiteral(resourceName: "flag_spain"), |
|
|
|
"no": #imageLiteral(resourceName: "flag_norway"), |
|
|
|
"ht": #imageLiteral(resourceName: "flag_haiti"), |
|
|
|
"al": #imageLiteral(resourceName: "flag_albania"), |
|
|
|
"mz": #imageLiteral(resourceName: "flag_mozambique"), |
|
|
|
"in": #imageLiteral(resourceName: "flag_india"), |
|
|
|
"br": #imageLiteral(resourceName: "flag_brazil"), |
|
|
|
"bj": #imageLiteral(resourceName: "flag_benin"), |
|
|
|
"se": #imageLiteral(resourceName: "flag_sweden"), |
|
|
|
"pe": #imageLiteral(resourceName: "flag_peru"), |
|
|
|
"cf": #imageLiteral(resourceName: "flag_central_african_republic"), |
|
|
|
"tz": #imageLiteral(resourceName: "flag_tanzania"), |
|
|
|
"uy": #imageLiteral(resourceName: "flag_uruguay"), |
|
|
|
"vu": #imageLiteral(resourceName: "flag_vanuatu"), |
|
|
|
"my": #imageLiteral(resourceName: "flag_malaysia"), |
|
|
|
"md": #imageLiteral(resourceName: "flag_moldova"), |
|
|
|
"gt": #imageLiteral(resourceName: "flag_guatemala"), |
|
|
|
"is": #imageLiteral(resourceName: "flag_iceland"), |
|
|
|
"gr": #imageLiteral(resourceName: "flag_greece"), |
|
|
|
"tw": #imageLiteral(resourceName: "flag_taiwan"), |
|
|
|
"om": #imageLiteral(resourceName: "flag_oman"), |
|
|
|
"pt": #imageLiteral(resourceName: "flag_portugal"), |
|
|
|
"by": #imageLiteral(resourceName: "flag_belarus"), |
|
|
|
"kw": #imageLiteral(resourceName: "flag_kuwait"), |
|
|
|
"gl": #imageLiteral(resourceName: "flag_greenland"), |
|
|
|
"td": #imageLiteral(resourceName: "flag_chad"), |
|
|
|
"na": #imageLiteral(resourceName: "flag_namibia"), |
|
|
|
"ee": #imageLiteral(resourceName: "flag_estonia"), |
|
|
|
"ms": #imageLiteral(resourceName: "flag_montserrat"), |
|
|
|
"mv": #imageLiteral(resourceName: "flag_maldives"), |
|
|
|
"af": #imageLiteral(resourceName: "flag_afghanistan"), |
|
|
|
"nc": #imageLiteral(resourceName: "flag_new_caledonia"), |
|
|
|
"ga": #imageLiteral(resourceName: "flag_gabon"), |
|
|
|
"mo": #imageLiteral(resourceName: "flag_macao"), |
|
|
|
"ni": #imageLiteral(resourceName: "flag_nicaragua"), |
|
|
|
"zw": #imageLiteral(resourceName: "flag_zimbabwe"), |
|
|
|
"bm": #imageLiteral(resourceName: "flag_bermuda"), |
|
|
|
"rs": #imageLiteral(resourceName: "flag_serbia"), |
|
|
|
"cy": #imageLiteral(resourceName: "flag_cyprus"), |
|
|
|
"ao": #imageLiteral(resourceName: "flag_angola"), |
|
|
|
"py": #imageLiteral(resourceName: "flag_paraguay"), |
|
|
|
"tv": #imageLiteral(resourceName: "flag_tuvalu"), |
|
|
|
"mc": #imageLiteral(resourceName: "flag_monaco"), |
|
|
|
"sm": #imageLiteral(resourceName: "flag_san_marino"), |
|
|
|
"er": #imageLiteral(resourceName: "flag_eritrea"), |
|
|
|
"bt": #imageLiteral(resourceName: "flag_bhutan"), |
|
|
|
"ba": #imageLiteral(resourceName: "flag_bosnia_and_herzegovina"), |
|
|
|
"sc": #imageLiteral(resourceName: "flag_seychelles"), |
|
|
|
"mg": #imageLiteral(resourceName: "flag_madagascar"), |
|
|
|
"st": #imageLiteral(resourceName: "flag_sao_tome_and_principe"), |
|
|
|
"eg": #imageLiteral(resourceName: "flag_egypt"), |
|
|
|
"ky": #imageLiteral(resourceName: "flag_cayman_islands"), |
|
|
|
"ug": #imageLiteral(resourceName: "flag_uganda"), |
|
|
|
"sy": #imageLiteral(resourceName: "flag_syria"), |
|
|
|
"cm": #imageLiteral(resourceName: "flag_cameroon"), |
|
|
|
"aq": #imageLiteral(resourceName: "flag_antarctica"), |
|
|
|
"tn": #imageLiteral(resourceName: "flag_tunisia"), |
|
|
|
"ge": #imageLiteral(resourceName: "flag_georgia"), |
|
|
|
"it": #imageLiteral(resourceName: "flag_italy"), |
|
|
|
"gq": #imageLiteral(resourceName: "flag_equatorial_guinea"), |
|
|
|
"ca": #imageLiteral(resourceName: "flag_canada"), |
|
|
|
"am": #imageLiteral(resourceName: "flag_armenia"), |
|
|
|
"rw": #imageLiteral(resourceName: "flag_rwanda"), |
|
|
|
"bf": #imageLiteral(resourceName: "flag_burkina_faso"), |
|
|
|
"fo": #imageLiteral(resourceName: "flag_faroe_islands"), |
|
|
|
"aw": #imageLiteral(resourceName: "flag_aruba"), |
|
|
|
"fi": #imageLiteral(resourceName: "flag_finland"), |
|
|
|
"lv": #imageLiteral(resourceName: "flag_latvia"), |
|
|
|
"lt": #imageLiteral(resourceName: "flag_lithuania"), |
|
|
|
"np": #imageLiteral(resourceName: "flag_nepal"), |
|
|
|
"pg": #imageLiteral(resourceName: "flag_papua_new_guinea"), |
|
|
|
"ad": #imageLiteral(resourceName: "flag_andorra"), |
|
|
|
"me": #imageLiteral(resourceName: "flag_montenegro"), |
|
|
|
"pa": #imageLiteral(resourceName: "flag_panama"), |
|
|
|
"kh": #imageLiteral(resourceName: "flag_cambodia"), |
|
|
|
"ma": #imageLiteral(resourceName: "flag_morocco"), |
|
|
|
"lb": #imageLiteral(resourceName: "flag_lebanon"), |
|
|
|
"tk": #imageLiteral(resourceName: "flag_tokelau"), |
|
|
|
"nz": #imageLiteral(resourceName: "flag_new_zealand"), |
|
|
|
"sd": #imageLiteral(resourceName: "flag_sudan"), |
|
|
|
"hu": #imageLiteral(resourceName: "flag_hungary"), |
|
|
|
"iq": #imageLiteral(resourceName: "flag_iraq"), |
|
|
|
"hr": #imageLiteral(resourceName: "flag_croatia"), |
|
|
|
"ch": #imageLiteral(resourceName: "flag_switzerland"), |
|
|
|
"do": #imageLiteral(resourceName: "flag_dominican_republic"), |
|
|
|
"mk": #imageLiteral(resourceName: "flag_macedonia"), |
|
|
|
"ng": #imageLiteral(resourceName: "flag_nigeria"), |
|
|
|
"lu": #imageLiteral(resourceName: "flag_luxembourg"), |
|
|
|
"pk": #imageLiteral(resourceName: "flag_pakistan"), |
|
|
|
"ro": #imageLiteral(resourceName: "flag_romania"), |
|
|
|
"ar": #imageLiteral(resourceName: "flag_argentina"), |
|
|
|
"de": #imageLiteral(resourceName: "flag_germany"), |
|
|
|
"km": #imageLiteral(resourceName: "flag_comoros"), |
|
|
|
"sk": #imageLiteral(resourceName: "flag_slovakia"), |
|
|
|
"ke": #imageLiteral(resourceName: "flag_kenya"), |
|
|
|
"ml": #imageLiteral(resourceName: "flag_mali"), |
|
|
|
"ye": #imageLiteral(resourceName: "flag_yemen"), |
|
|
|
"il": #imageLiteral(resourceName: "flag_israel"), |
|
|
|
"ae": #imageLiteral(resourceName: "flag_united_arab_emirates"), |
|
|
|
"eh": #imageLiteral(resourceName: "flag_western_sahara"), |
|
|
|
"io": #imageLiteral(resourceName: "flag_british_indian_ocean_territory"), |
|
|
|
"mw": #imageLiteral(resourceName: "flag_malawi"), |
|
|
|
"lk": #imageLiteral(resourceName: "flag_sri_lanka"), |
|
|
|
"bh": #imageLiteral(resourceName: "flag_bahrain"), |
|
|
|
"nf": #imageLiteral(resourceName: "flag_norfolk_island"), |
|
|
|
"kr": #imageLiteral(resourceName: "flag_south_korea"), |
|
|
|
"uz":#imageLiteral(resourceName: "flag_uzbekistn"), |
|
|
|
"ru":#imageLiteral(resourceName: "flag_russia"), |
|
|
|
"en": #imageLiteral(resourceName: "flag_united_kingdom") |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
var defaultCountries = [ |
|
|
|
"Nepal", "Cambodia", "Philipinnes", "Sri Lanka", "Vietnam", "India", "Pakistan", "azerbaijan", |
|
|
|
"Bangladesh", "Belarus", "Georgia", "Indonesia", "Kazakhstan", "Kyrgyzstan", "Malaysia", "Moldova", |
|
|
|
"Mongolia", "Myanmar", "Russian Federation", "Singapore", "Tajikistan", "Thailand", "Uzbekistan" |
|
|
|
] |
|
|
|
|
|
|
|
var defaultCountryCodes = [ |
|
|
|
"np", "kh", "ph", "lk", "vn", "in", "pk", "az", "bd", "by", "ge", "kz", "kg", "my", "md", "mn", "mm", |
|
|
|
"ru", "sg", "tj", "th", "uz", "en" |
|
|
|
] |
|
|
|
|
|
|
|
private var defaultSendingAmount: [String: String] = |
|
|
|
[ |
|
|
|
"np" : "100000", // nepal |
|
|
|
"kh" : "500", // cambodia |
|
|
|
"ph" : "50000", // philipines |
|
|
|
"lk" : "100,000", // sri lanka |
|
|
|
"vn" : "50000000", // Vietnam |
|
|
|
"in" : "50000", // india |
|
|
|
"pk" : "100000", // pakistan |
|
|
|
"az" : "1000", // azerbaijan |
|
|
|
"bd" : "100000", // Bangladesh |
|
|
|
"by" : "1000", // Belarus |
|
|
|
"ge" : "1000", // Georgia |
|
|
|
// "id" : "1000000", // indonesia |
|
|
|
"kz" : "1000", // Kazakhstan |
|
|
|
"kg" : "1000", // Kyrgyzstan |
|
|
|
"my" : "10000", // Malaysia |
|
|
|
"md" : "1000", // Moldova |
|
|
|
"mn" : "1000", // Mongolia |
|
|
|
"mm" : "1500000", // Myanmar |
|
|
|
"ru" : "1000", // Russian Federation |
|
|
|
"sg" : "2000", // Singapore |
|
|
|
"tj" : "1000", // Tajikistan |
|
|
|
"th" : "30000", // Thailand |
|
|
|
"uz" : "1000", // Uzbekistan |
|
|
|
"default": "1000000" |
|
|
|
] |
|
|
|
|
|
|
|
private var defaultSendingCurrency: [String: String] = |
|
|
|
[ |
|
|
|
"np" : "NPR", // nepal |
|
|
|
"kh" : "USD", // cambodia |
|
|
|
"ph" : "PHP", // philipines |
|
|
|
"lk" : "LKR", // sri lanka |
|
|
|
"vn" : "VND", // vietnam |
|
|
|
"in" : "INR", // india |
|
|
|
"pk" : "PKR", // pakistan |
|
|
|
"az" : "USD", // azerbaijan |
|
|
|
"bd" : "USD", // Bangladesh |
|
|
|
"by" : "USD", // Belarus |
|
|
|
"ge" : "USD", // Georgia |
|
|
|
"id" : "IDR", // Indonesia |
|
|
|
"kz" : "USD", // Kazakhstan |
|
|
|
"kg" : "USD", // Kyrgyzstan |
|
|
|
"my" : "MYR", // Malaysia |
|
|
|
"md" : "USD", // Moldova |
|
|
|
"mn" : "USD", // Mongolia |
|
|
|
"mm" : "MMK", // Myanmar |
|
|
|
"ru" : "USD", // Russian Federation |
|
|
|
"sg" : "SGD", // Singapore |
|
|
|
"tj" : "USD", // Tajikistan |
|
|
|
"th" : "THB", // Thailand |
|
|
|
"uz" : "USD", // Uzbekistan |
|
|
|
"default": "KRW" |
|
|
|
] |
|
|
|
|
|
|
|
private var secondarySendingCurrency: [String: String] = |
|
|
|
[ |
|
|
|
"vn" : "USD", // vietnam |
|
|
|
"mn" : "MNT", // Mongolia |
|
|
|
"lk" : "USD" // sri lanka |
|
|
|
] |
|
|
|
|
|
|
|
private var secondarySendingAmount: [String: String] = |
|
|
|
[ |
|
|
|
"vn" : "2000", // Vietnam |
|
|
|
"lk" : "1000", // sri lanka |
|
|
|
"mn" : "2000000" // Mongolia |
|
|
|
] |
|
|
|
|
|
|
|
func getFlag(for countryCode: String) -> UIImage? { |
|
|
|
return flag[countryCode.lowercased()] ?? nil |
|
|
|
} |
|
|
|
|
|
|
|
func getDefaultSendingAmount(for countryCode: String) -> String? { |
|
|
|
return defaultSendingAmount[countryCode.lowercased()] |
|
|
|
} |
|
|
|
|
|
|
|
func getDefaultSendingCurrency(for countryCode: String) -> String? { |
|
|
|
return defaultSendingCurrency[countryCode.lowercased()] |
|
|
|
} |
|
|
|
|
|
|
|
func getDefaultSendingMoneyInKoreanWon() -> String? { |
|
|
|
return defaultSendingAmount["default"] |
|
|
|
} |
|
|
|
|
|
|
|
func doesCountryCodeHasDefined(country: String, currency: String) -> Bool { |
|
|
|
return defaultSendingCurrency[country.lowercased()]?.contains(currency) ?? false |
|
|
|
} |
|
|
|
|
|
|
|
func doesSecondaryOptiopsHasDefined(country: String, currency: String) -> Bool { |
|
|
|
return secondarySendingCurrency[country.lowercased()]?.contains(currency) ?? false |
|
|
|
} |
|
|
|
|
|
|
|
func getSecondarySendingAmount(for countryCode: String) -> String? { |
|
|
|
return secondarySendingAmount[countryCode.lowercased()] |
|
|
|
} |
|
|
|
|
|
|
|
private var secondarySendingCurrency: [String: String] = |
|
|
|
[ |
|
|
|
"vn" : "USD", // vietnam |
|
|
|
"mn" : "MNT", // Mongolia |
|
|
|
"lk" : "USD", // sri lanka |
|
|
|
] |
|
|
|
|
|
|
|
private var secondarySendingAmount: [String: String] = |
|
|
|
[ |
|
|
|
"vn" : "2000", // Vietnam |
|
|
|
"lk" : "1000", // sri lanka |
|
|
|
"mn" : "2000000", // Mongolia |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
func getFlag(for countryCode: String) -> UIImage? { |
|
|
|
return flag[countryCode.lowercased()] ?? nil |
|
|
|
} |
|
|
|
|
|
|
|
func getDefaultSendingAmount(for countryCode: String) -> String? { |
|
|
|
return defaultSendingAmount[countryCode.lowercased()] |
|
|
|
} |
|
|
|
|
|
|
|
func getDefaultSendingCurrency(for countryCode: String) -> String? { |
|
|
|
return defaultSendingCurrency[countryCode.lowercased()] |
|
|
|
} |
|
|
|
|
|
|
|
func getDefaultSendingMoneyInKoreanWon() -> String? { |
|
|
|
return defaultSendingAmount["default"] |
|
|
|
} |
|
|
|
|
|
|
|
func doesCountryCodeHasDefined(country: String, currency: String) -> Bool { |
|
|
|
return defaultSendingCurrency[country.lowercased()]?.contains(currency) ?? false |
|
|
|
} |
|
|
|
|
|
|
|
func doesSecondaryOptiopsHasDefined(country: String, currency: String) -> Bool { |
|
|
|
return secondarySendingCurrency[country.lowercased()]?.contains(currency) ?? false |
|
|
|
} |
|
|
|
|
|
|
|
func getSecondarySendingAmount(for countryCode: String) -> String? { |
|
|
|
return secondarySendingAmount[countryCode.lowercased()] |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|