added to the collect checkout logic.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user