Browse Source

transfer details page amount calculate fixes and referral code populated

dev
puranpanthi 7 months ago
parent
commit
1bc9e1bbdf
  1. 38
      GME Remit/AppDelegate.swift
  2. 5
      GME Remit/Modules/RegisterModules/NewUserRegister/User Interface/View/NewUserRegisterViewController.swift
  3. 6
      GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift
  4. 4
      GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift
  5. 4
      GME Remit/MultiLanguages/en.lproj/Localizable.strings
  6. 2
      GME Remit/MultiLanguages/ne.lproj/Localizable.strings
  7. 20
      GME Remit/Supported Files/Info.plist

38
GME Remit/AppDelegate.swift

@ -165,18 +165,19 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func handleDynamicLink(_ url: URL) {
let params = URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems
// Extract and handle query parameters
if let inviteValue = params?.first(where: { $0.name == "invite" })?.value {
let params = URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems
// Access individual parameters using params
if let embeddedUrlString = params?.first(where: { $0.name == "link" })?.value as? String,
let embeddedUrl = URL(string: embeddedUrlString),
let insideParams = URLComponents(url: embeddedUrl, resolvingAgainstBaseURL: false)?.queryItems,
let inviteValue = insideParams.first(where: { $0.name == "invite" })?.value as? String {
// Inside AppDelegate, where you want to send the value
self.referalCode = inviteValue
let valueToSend = inviteValue
NotificationCenter.default.post(name: NSNotification.Name("NotificationIdentifier"), object: nil, userInfo: ["key": valueToSend])
print("Invite value: \(inviteValue)")
UserDefaults.standard.setValue(valueToSend, forKey: "ReferedValue")
}
}
}
func application(
_ application: UIApplication,
@ -245,25 +246,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return true
}
public func application(_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
if let url = userActivity.webpageURL {
let params = URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems
// Access individual parameters using params
if let inviteValue = params?.first(where: { $0.name == "invite" })?.value {
// Inside AppDelegate, where you want to send the value
self.referalCode = inviteValue
let valueToSend = inviteValue
NotificationCenter.default.post(name: NSNotification.Name("NotificationIdentifier"), object: nil, userInfo: ["key": valueToSend])
print("Invite value: \(inviteValue)")
}
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
if let url = userActivity.webpageURL {
handleDynamicLink(url)
}
return true
}
return true
}
}
// MARK: - UNUserNotificationCenterDelegate

5
GME Remit/Modules/RegisterModules/NewUserRegister/User Interface/View/NewUserRegisterViewController.swift

@ -158,7 +158,10 @@ class NewUserRegisterViewController: UIViewController {
self.referalCodeFromLink = appDelegate.referalCode ?? ""
self.referralCode.text = self.referalCodeFromLink
}
NotificationCenter.default.addObserver(self, selector: #selector(handleNotification(_:)), name: NSNotification.Name("NotificationIdentifier"), object: nil)
if let from = UserDefaults.standard.value(forKey: "From") as? String, !(from ?? "").isEmpty {
self.referralCode.text = from
}
// NotificationCenter.default.addObserver(self, selector: #selector(handleNotification(_:)), name: NSNotification.Name("NotificationIdentifier"), object: nil)
}
override func viewWillAppear(_ animated: Bool) {

6
GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift

@ -305,7 +305,7 @@ class SendMoneyReceiptViewController: UIViewController {
self.recieverTitleLabel.text = StringConstants().recieverText
self.addressTitleLabel.text = StringConstants().addressText
self.mobileTitleLabel.text = StringConstants().mobileNoText
self.payoutAgentTitleLabel.text = "Collected Amount"
self.payoutAgentTitleLabel.text = "collected_amount_text".localized()
self.agentBank.text = "Payout Agent/Bank"
self.totalPayoutAmountTitleLabel.text = StringConstants().totalSentAmountText
self.branchTitleLabel.text = StringConstants().branchText
@ -403,8 +403,8 @@ class SendMoneyReceiptViewController: UIViewController {
self.accountNoView.isHidden = accountNo == ""
self.accountNoLabel.text = self.reciept?.accountNo
var sendAmount = ""
if let totalAmount = Double(self.reciept?.collAmount?.currencyToDecimal() ?? ""), let serviceCharge = Double(self.reciept?.serviceCharge?.currencyToDecimal() ?? ""){
sendAmount = "\(totalAmount - serviceCharge)"
if let totalAmount = Double(self.reciept?.collAmount?.currencyToDecimal() ?? ""), let serviceCharge = Double(self.reciept?.serviceCharge?.currencyToDecimal() ?? ""), let rewardAmount = Double(self.reciept?.rewardPoints?.currencyToDecimal() ?? ""){
sendAmount = "\(totalAmount - serviceCharge + rewardAmount)"
}
self.relationLabel.text = sendAmount.decimalToCurrency(as: .krw)

4
GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift

@ -182,8 +182,8 @@ class SendMoneyVerificationViewController: UITableViewController {
self.exchangeRateTitleLabel.text = "exchange_rate_text".localized()
self.serviceChargeTitleLabel.text = "service_charge_text".localized()
self.payoutAgentBankTitleLabel.text = "payout_agent_text".localized()
self.collectedAmountTitleLabel.text = "Collected Amount".localized()
self.sendAmountTitleLabel.text = "Transfer Amount".localized()
self.collectedAmountTitleLabel.text = "collected_amount_text".localized()
self.sendAmountTitleLabel.text = "transfer_amount_text".localized()
self.accountNumTitlelabel.text = "account_text".localized()
self.recieverDetailsLabel.text = StringConstants().recieverDetails
self.transactionDetailsLabel.text = StringConstants().transactionDetails

4
GME Remit/MultiLanguages/en.lproj/Localizable.strings

@ -244,7 +244,7 @@
"terms_and_condition_text" = "Terms & Conditions";
"privacy_policy_text" = "Privacy Policy";
"send_amount_text" = "Send Amount";
"transfer_amount_text" = "Transfer Amount";
"transfer_amount_text" = "ToTal Transfer Amount";
"collected_amount_text" = "Collected Amount";
"terms_and_conditions_content_text" = "In order to use IME London\'s overseas remittances and domestic remittances smoothly, you need to agree to withdraw money from your account. Withdrawal transfer will be made through open banking from the account you agreed to withdraw when using services such as overseas remittance and domestic remittance.";
"payment_information_link_text" = "Payment Information";
@ -266,7 +266,7 @@
"service_fee_text" = "Service Fee";
"ex_rate_text" = "Ex Rate";
"total_amount_text" = "Total Amount";
"total_sent_amount_text" = "Total Sent Amount";
"total_sent_amount_text" = "Total Transfer Amount";
"request_to_cancel_text" = "Request to Cancel";
"request_to_change_text" = "Request to Change";

2
GME Remit/MultiLanguages/ne.lproj/Localizable.strings

@ -244,7 +244,7 @@
"terms_and_condition_text" = "नियम तथा सर्त";
"privacy_policy_text" = "गोपनीयता नीति";
"send_amount_text" = "Send Amount";
"transfer_amount_text" = "Transfer Amount";
"transfer_amount_text" = "ToTal Sent Amount";
"collected_amount_text" = "Collected Amount";
"terms_and_conditions_content_text" = "In order to use IME London\'s overseas remittances and domestic remittances smoothly, you need to agree to withdraw money from your account. Withdrawal transfer will be made through open banking from the account you agreed to withdraw when using services such as overseas remittance and domestic remittance.";
"payment_information_link_text" = "भुक्तानी जानकारी";

20
GME Remit/Supported Files/Info.plist

@ -25,12 +25,12 @@
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<string>Viewer</string>
<key>CFBundleURLName</key>
<string>JMERemitBundle</string>
<string>com.imelondon</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.imelondon</string>
<string>imelondon.page.link</string>
</array>
</dict>
<dict>
@ -41,29 +41,19 @@
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<string>Viewer</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb1129818613815224</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.gme.gmeremit</string>
<key>CFBundleURLSchemes</key>
<array>
<string>GMERemit</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>FacebookAppID</key>
<string>331163960743784</string>
<key>FacebookDisplayName</key>
<string>GME</string>
<string>IME London</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<true/>
<key>FirebaseDeepLinkPasteboardRetrievalEnabled</key>

Loading…
Cancel
Save