added to the collect checkout logic.

This commit is contained in:
Ty Reynolds
2026-03-12 14:24:34 -04:00
parent 961504dd83
commit cd57206be1
2 changed files with 10 additions and 13 deletions

View File

@@ -121,12 +121,20 @@ def call_payment_api(payload):
def get_collect_checkout_url(invoice):
inv = frappe.get_doc("Sales Invoice", invoice)
username = frappe.conf.get("nmi_username")
password = frappe.conf.get("nmi_password")
if not username or not password:
frappe.throw("NMI credentials not configured")
return (
"https://crystalclear.transactiongateway.com/collect/checkout"
f"?amount={inv.outstanding_amount}&reference={inv.name}"
f"?username={username}"
f"&password={password}"
f"&amount={inv.outstanding_amount}"
f"&orderid={inv.name}"
)
@frappe.whitelist(allow_guest=True)
def crystalclear_webhook():
data = frappe.local.form_dict

View File

@@ -49,17 +49,6 @@ ns_app.customer.open_quick_entry = function (opts = {}) {
default: "Commercial",
reqd: 1
},
{
fieldname: "custom_auto_pay_enabled",
label: "Auto Pay Enabled",
fieldtype: "Check",
default: 0
},
{
fieldname: "custom_auto_pay_id",
label: "AutoPay ID",
fieldtype: "Data"
},
{
fieldname: "custom_send_via",
label: "Send Via",