- {{
- __(
- 'Make sure to enter the correct billing name as the same will be used in your invoice.'
- )
- }}
-
+
+
+
+ {{
+ __('Please provide your consent to proceed with the payment')
+ }}
+
+
@@ -194,7 +229,7 @@ import {
toast,
call,
} from 'frappe-ui'
-import { reactive, inject, onMounted, computed, ref } from 'vue'
+import { reactive, inject, onMounted, computed, ref, watch } from 'vue'
import { sessionStore } from '../stores/session'
import Link from '@/components/Controls/Link.vue'
import NotPermitted from '@/components/NotPermitted.vue'
@@ -202,6 +237,7 @@ import { X } from 'lucide-vue-next'
const user = inject('$user')
const { brand } = sessionStore()
+const showConsentWarning = ref(false)
onMounted(() => {
const script = document.createElement('script')
@@ -296,6 +332,10 @@ const generatePaymentLink = () => {
if (!billingDetails.source) {
return __('Please let us know where you heard about us from.')
}
+ if (!billingDetails.member_consent) {
+ showConsentWarning.value = true
+ return __('Please provide your consent to proceed with the payment.')
+ }
return validateAddress()
},
onSuccess(data) {
@@ -406,6 +446,12 @@ const redirectTo = computed(() => {
}
})
+watch(billingDetails, () => {
+ if (billingDetails.member_consent) {
+ showConsentWarning.value = false
+ }
+})
+
usePageMeta(() => {
return {
title: __('Billing Details'),
diff --git a/lms/lms/doctype/lms_payment/lms_payment.json b/lms/lms/doctype/lms_payment/lms_payment.json
index b587b694..9688c3d4 100644
--- a/lms/lms/doctype/lms_payment/lms_payment.json
+++ b/lms/lms/doctype/lms_payment/lms_payment.json
@@ -15,6 +15,7 @@
"payment_for_document",
"payment_received",
"payment_for_certificate",
+ "member_consent",
"payment_details_section",
"original_amount",
"discount_amount",
@@ -181,6 +182,12 @@
"fieldtype": "Currency",
"label": "Original Amount",
"options": "currency"
+ },
+ {
+ "default": "0",
+ "fieldname": "member_consent",
+ "fieldtype": "Check",
+ "label": "Member Consent"
}
],
"index_web_pages_for_search": 1,
@@ -194,7 +201,7 @@
"link_fieldname": "payment"
}
],
- "modified": "2025-11-12 12:39:52.466297",
+ "modified": "2025-12-19 17:55:25.968384",
"modified_by": "sayali@frappe.io",
"module": "LMS",
"name": "LMS Payment",
diff --git a/lms/lms/payments.py b/lms/lms/payments.py
index e97b6834..8c2e1834 100644
--- a/lms/lms/payments.py
+++ b/lms/lms/payments.py
@@ -121,6 +121,7 @@ def record_payment(
"payment_for_document_type": doctype,
"payment_for_document": docname,
"payment_for_certificate": payment_for_certificate,
+ "member_consent": address.member_consent,
}
)
if coupon_code: