-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from navariltd/transaction_status
refactor: remove transaction_status button from mpesa_c2b_payment_register to mpesa_settings
- Loading branch information
Showing
8 changed files
with
329 additions
and
144 deletions.
There are no files selected for viewing
43 changes: 5 additions & 38 deletions
43
...pe_mpsa_payments/doctype/mpesa_c2b_payment_register_url/mpesa_c2b_payment_register_url.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,8 @@ | ||
// Copyright (c) 2024, Navari Limited and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on("Mpesa C2B Payment Register URL", { | ||
refresh(frm) { | ||
frm.add_custom_button("Check Transaction Status", () => { | ||
frappe.prompt( | ||
[ | ||
{ | ||
label: "Transaction ID", | ||
fieldname: "transaction_id", | ||
fieldtype: "Data", | ||
reqd: 1 | ||
}, | ||
{ | ||
label: "Remarks", | ||
fieldname: "remarks", | ||
fieldtype: "Small Text", | ||
} | ||
], | ||
(values) => { | ||
frappe.call({ | ||
method: "trigger_transaction_status", | ||
doc: frm.doc, | ||
args: { | ||
transaction_id: values.transaction_id, | ||
remarks: values.remarks | ||
}, | ||
callback: (r) => { | ||
if (r.message) { | ||
frappe.msgprint(r.message) | ||
} | ||
} | ||
}); | ||
}, | ||
__("Transaction Status Query"), | ||
__("Submit") | ||
); | ||
}); | ||
}, | ||
}); | ||
// frappe.ui.form.on("Mpesa C2B Payment Register URL", { | ||
// refresh(frm) { | ||
|
||
// }, | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 59 additions & 60 deletions
119
...appe_mpsa_payments/doctype/mpesa_public_key_certificate/mpesa_public_key_certificate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,60 @@ | ||
{ | ||
"actions": [], | ||
"creation": "2024-07-09 15:06:17.747970", | ||
"doctype": "DocType", | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"certificates_section", | ||
"sandbox_certificate", | ||
"column_break_xshs", | ||
"production_certificate" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "sandbox_certificate", | ||
"fieldtype": "Attach", | ||
"in_list_view": 1, | ||
"label": "Sandbox Certificate", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "column_break_xshs", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "production_certificate", | ||
"fieldtype": "Attach", | ||
"in_list_view": 1, | ||
"label": "Production Certificate", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "certificates_section", | ||
"fieldtype": "Section Break", | ||
"label": "Certificates" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"issingle": 1, | ||
"links": [], | ||
"modified": "2024-07-09 15:08:38.962831", | ||
"modified_by": "Administrator", | ||
"module": "Frappe Mpsa Payments", | ||
"name": "Mpesa Public Key Certificate", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"print": 1, | ||
"read": 1, | ||
"role": "System Manager", | ||
"share": 1, | ||
"write": 1 | ||
} | ||
], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [], | ||
"track_changes": 1 | ||
} | ||
"actions": [], | ||
"creation": "2024-07-09 15:06:17.747970", | ||
"doctype": "DocType", | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"certificates_section", | ||
"sandbox_certificate", | ||
"column_break_xshs", | ||
"production_certificate" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "sandbox_certificate", | ||
"fieldtype": "Attach", | ||
"in_list_view": 1, | ||
"label": "Sandbox Certificate" | ||
}, | ||
{ | ||
"fieldname": "column_break_xshs", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "production_certificate", | ||
"fieldtype": "Attach", | ||
"in_list_view": 1, | ||
"label": "Production Certificate", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "certificates_section", | ||
"fieldtype": "Section Break", | ||
"label": "Certificates" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"issingle": 1, | ||
"links": [], | ||
"modified": "2025-02-17 09:02:23.002707", | ||
"modified_by": "Administrator", | ||
"module": "Frappe Mpsa Payments", | ||
"name": "Mpesa Public Key Certificate", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"print": 1, | ||
"read": 1, | ||
"role": "System Manager", | ||
"share": 1, | ||
"write": 1 | ||
} | ||
], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [], | ||
"track_changes": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.