Repository navigation
Recurring payments: Admin and Store screens, order links and menu (slice 5 of 5) - #1079
Merged
Merged
Conversation
added 4 commits
November 21, 2026 15:04
…ts initial order in the panels
| query = query.Where(x => x.StoreId == request.StoreId); | ||
|
|
||
| if (request.Status.HasValue) | ||
| query = query.Where(x => x.Status == request.Status.Value); |
Comment on lines
+53
to
+57
| catch (Exception ex) | ||
| { | ||
| logService.LogError(ex, "UpgradeProcess - RecurringPaymentMenu (2.5)"); | ||
| return false; | ||
| } |
Comment on lines
+30
to
+34
| catch (Exception ex) | ||
| { | ||
| logService.LogError(ex, "UpgradeProcess - RecurringPaymentCreatedOnIndex (2.5)"); | ||
| return false; | ||
| } |
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.
Type: feature
Issue
Slices 1–4 (#1075–#1078) record recurring payments, react to the gateway, cancel them and show them to the customer. Staff still have no screen for them:
This is slice 5 of 5 of recurring payments (payments roadmap P5): the Admin and Store panels.
Solution
Sales → Recurring payments (Admin and Store)
BaseRecurringPaymentControllerlives in AdminShared, with thin Admin and Store subclasses. It follows the shape of the payment transaction screens.List,PreviewandCancelactions). There is no new permission.List. Filters:
Columns:
Details. The screen shows:
Cancel. The button is outline danger and asks for confirmation first. It sends the existing
CancelRecurringPaymentCommand, with the staff member asCancelledBy.GetRecurringPaymentsQuery. A new query in Grand.Business.Core, with its handler, sorted newest first. It filters by:Who sees what
StoreIdmust match the staff member's store, whatever the list posts or the URL says.EditorCancelof another store's payment redirects to the list and changes nothing.IAdminDataScope<Order>.HasAccesson the initial order, so the order screen's rule applies here too.SeId, the same way the order list does.Order screen
OrderViewModelService.PrepareOrderRecurringPaymentprepares these fields. It is skipped in the Vendor panel.Persisted data
StandardAdminSiteMap, where the later entries move down by one;MigrationRecurringPaymentMenu(2.5), for existing installations. The migration is idempotent, and a menu without a Sales section gets nothing.DefaultLanguage.xmlanden_250.xml.RecurringPayment.Cycle.*andRecurringPayment.CyclesPaid.*.Breaking changes
OrderViewModelServicetakes one more constructor argument (IRecurringPaymentService).Testing
Automated:
dotnet build src/Web/Grand.Web→ 0 errors.Grand.Web.Admin.Tests2097/2097.Grand.Web.Store.Tests245/245.Grand.Modules.Testsmigration tests 101/101.GetRecurringPaymentsQueryHandlerTests6/6.The new tests cover:
E2E on a throwaway installation (Mongo, sample data, Playwright): 31/31 checks pass.
Setup:
Results: