Added feature toggle for the check box on custom form. Turned off at the moment so we can push to prod even though this feature is complete.

This commit is contained in:
Ty Reynolds
2026-04-14 09:40:36 -04:00
parent cc44683972
commit e7e9fc96c2
2 changed files with 8 additions and 3 deletions

View File

@@ -120,6 +120,9 @@ def call_payment_api(payload):
@frappe.whitelist()
def run_token_payment(invoice, token, cardholder_name=None, billing_zip=None, save_autopay=0):
if not frappe.conf.get("enable_autopay_signup"):
save_autopay = 0
inv = frappe.get_doc("Sales Invoice", invoice)
customer = frappe.get_doc("Customer", inv.customer)