fix: update integrations desk page (#23772)

diff --git a/erpnext/erpnext_integrations/desk_page/erpnext_integrations/erpnext_integrations.json b/erpnext/erpnext_integrations/desk_page/erpnext_integrations/erpnext_integrations.json
index 8dcc77d..ea3b129 100644
--- a/erpnext/erpnext_integrations/desk_page/erpnext_integrations/erpnext_integrations.json
+++ b/erpnext/erpnext_integrations/desk_page/erpnext_integrations/erpnext_integrations.json
@@ -8,7 +8,7 @@
   {
    "hidden": 0,
    "label": "Payments",
-   "links": "[\n    {\n        \"description\": \"GoCardless payment gateway settings\",\n        \"label\": \"GoCardless Settings\",\n        \"name\": \"GoCardless Settings\",\n        \"type\": \"doctype\"\n    }\n]"
+   "links": "[\n    {\n        \"description\": \"GoCardless payment gateway settings\",\n        \"label\": \"GoCardless Settings\",\n        \"name\": \"GoCardless Settings\",\n        \"type\": \"doctype\"\n    }, {\n        \"description\": \"M-Pesa payment gateway settings\",\n        \"label\": \"M-Pesa Settings\",\n        \"name\": \"Mpesa Settings\",\n        \"type\": \"doctype\"\n    }\n]"
   },
   {
    "hidden": 0,
@@ -29,7 +29,7 @@
  "idx": 0,
  "is_standard": 1,
  "label": "ERPNext Integrations",
- "modified": "2020-08-23 16:30:51.494655",
+ "modified": "2020-10-29 19:54:46.228222",
  "modified_by": "Administrator",
  "module": "ERPNext Integrations",
  "name": "ERPNext Integrations",
diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.js b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.js
index 636aa99..45d2986 100644
--- a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.js
+++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.js
@@ -13,7 +13,7 @@
 	},
 
 	get_account_balance: function(frm) {
-		if (!frm.initiator_name && !frm.security_credentials) {
+		if (!frm.doc.initiator_name && !frm.doc.security_credential) {
 			frappe.throw(__("Please set the initiator name and the security credential"));
 		}
 		frappe.call({
diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py
index dea4d81..1cad84d 100644
--- a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py
+++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py
@@ -147,7 +147,7 @@
 		return response
 	except Exception:
 		frappe.log_error(title=_("Account Balance Processing Error"))
-		frappe.throw(title=_("Error"), message=_("Please check your configuration and try again"))
+		frappe.throw(_("Please check your configuration and try again"), title=_("Error"))
 
 @frappe.whitelist(allow_guest=True)
 def process_balance_info(**kwargs):
@@ -173,7 +173,8 @@
 			ref_doc.db_set("account_balance", balance_info)
 
 			request.handle_success(account_balance_response)
-			frappe.publish_realtime("refresh_mpesa_dashboard")
+			frappe.publish_realtime("refresh_mpesa_dashboard", doctype="Mpesa Settings",
+				docname=transaction_data.reference_docname, user=transaction_data.owner)
 		except Exception:
 			request.handle_failure(account_balance_response)
 			frappe.log_error(title=_("Mpesa Account Balance Processing Error"), message=account_balance_response)