fix(payments): raise clear ValidationError when payment gateway is no…#2461
Open
walidsaleh wants to merge 89 commits into
Open
fix(payments): raise clear ValidationError when payment gateway is no…#2461walidsaleh wants to merge 89 commits into
walidsaleh wants to merge 89 commits into
Conversation
chore: merge 'main-hotfix' into 'main'
chore: merge 'main-hotfix' into 'main'
(cherry picked from commit 7d08a76)
chore: frappe dependency change (backport frappe#2190)
chore: merge 'main-hotfix' into 'main'
chore: merge 'main-hotfix' into 'main'
chore: merge `develop` into `main-hotfix`
(cherry picked from commit 99397ad)
(cherry picked from commit 89505ea)
(cherry picked from commit 400c950)
fix: course progress updated for scorm and video end event (backport frappe#2247)
(cherry picked from commit 029d76c)
(cherry picked from commit 71c13d6)
(cherry picked from commit 5b50701)
…2260 fix: misc ui improvements (backport frappe#2260)
(cherry picked from commit bb1b1f6)
fix: prevent path transversals in lms (backport frappe#2274)
chore: merge 'main-hotfix' into 'main'
chore: merge `develop` into `main-hotfix`
(cherry picked from commit c3e3337)
…2282 fix: prevent unauthorised enrollments in paid courses (backport frappe#2282)
chore: merge `develop` into `main-hotfix`
(cherry picked from commit f244a6c)
perf: refactor course outline and lesson to use qb (backport frappe#2381)
(cherry picked from commit 1207b01)
(cherry picked from commit 308a926)
(cherry picked from commit 629a6ee)
(cherry picked from commit 538edbb)
…2377 fix: user roles are removed on uninstall (backport frappe#2377)
…2376 fix: timezone now renders for courses and batches (backport frappe#2376)
…2383 fix(quiz): exam submissions and scope check_answer (backport frappe#2383)
…2367 feat: add empty states to settings (backport frappe#2367)
…n-hotfix chore: merge `develop` into `main-hotfix`
…-main chore: merge main-hotfix into main
(cherry picked from commit c826e95)
fix: system manager permissions are set properly on install (backport frappe#2399)
chore: merge `develop` into `main-hotfix`
…/main-hotfix-to-main-v2 # Conflicts: # lms/patches.txt
…ain-v2 chore: merge `main hotfix` to `main`
chore: merge `develop` into `main-hotfix`
chore: merge `main-hotfix` into `main`
…t configured Closes frappe#2457 When LMS Settings.payment_gateway is empty, or points to a Payment Gateway whose gateway_controller refers to a non-existent Settings doc, get_payment_link calls frappe.get_doc('Payment Gateway', <name>), which raises DoesNotExistError. Frappe re-surfaces this as a PermissionError toast on the student's checkout page: El usuario X no tiene acceso a doctype a través del permiso de rol para el documento Pasarela de Pago The message is misleading — the student has no permission problem; the gateway is simply not (or not properly) configured. Validate the gateway before calling the controller and raise a clear, actionable ValidationError that the frontend Billing.vue already displays via the toast. Also import frappe._ (was missing, the file already used other Frappe translation patterns in similar code).
11dd8b3 to
7db6f14
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(payments): raise clear ValidationError when payment gateway is not configured
Closes #2457
When LMS Settings.payment_gateway is empty, or points to a Payment
Gateway whose gateway_controller refers to a non-existent Settings
doc, get_payment_link calls frappe.get_doc('Payment Gateway', ),
which raises DoesNotExistError. Frappe re-surfaces this as a
PermissionError toast on the student's checkout page:
El usuario X no tiene acceso a doctype a través del permiso de rol
para el documento Pasarela de Pago
The message is misleading — the student has no permission problem; the
gateway is simply not (or not properly) configured. Validate the
gateway before calling the controller and raise a clear, actionable
ValidationError that the frontend Billing.vue already displays via
the toast.
Also import frappe._ (was missing, the file already used other
Frappe translation patterns in similar code).