From dd4fbfa8a204924517807e7167cca8f60de1aeac Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 23 Dec 2025 15:01:14 +0530 Subject: [PATCH] feat: billing consent ui --- frontend/src/pages/Billing.vue | 58 ++++++++++++++++++++++++++++------ lms/lms/payments.py | 1 + 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/frontend/src/pages/Billing.vue b/frontend/src/pages/Billing.vue index dd952ee7..a6e66f43 100644 --- a/frontend/src/pages/Billing.vue +++ b/frontend/src/pages/Billing.vue @@ -91,6 +91,16 @@ + +

+ {{ + __( + 'Please ensure that the billing name you enter is correct, as it will be used on your invoice.' + ) + }} +

@@ -104,16 +114,22 @@ - +
-
-

- {{ - __( - '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') + }} +
+
@@ -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) { 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: