Skip to content

Fix subaccounts#98

Merged
musale merged 6 commits into
mainfrom
feat/subaccounts
May 26, 2026
Merged

Fix subaccounts#98
musale merged 6 commits into
mainfrom
feat/subaccounts

Conversation

@musale

@musale musale commented May 26, 2026

Copy link
Copy Markdown
Contributor

AdminRequiredMixin (LoginRequiredMixin) performs sync DB operations
(session/auth lookup) which Django forbids in async context. Converted:

  • ServiceCreateSubaccountView: now calls _make_paystack_request directly
  • PaymentRefundView: uses sync ORM + async_to_sync for webhook dispatch

Remaining async views (InitiatePayment, VerifyPayment, Webhook) are
public-facing without auth mixins, so they work fine in async mode.

musale added 3 commits May 27, 2026 01:36
AdminRequiredMixin (LoginRequiredMixin) performs sync DB operations
(session/auth lookup) which Django forbids in async context. Converted:
- ServiceCreateSubaccountView: now calls _make_paystack_request directly
- PaymentRefundView: uses sync ORM + async_to_sync for webhook dispatch

Remaining async views (InitiatePayment, VerifyPayment, Webhook) are
public-facing without auth mixins, so they work fine in async mode.
Paystack API returns duplicate bank entries (same bank, different
branch types). Filter by unique code to prevent double-named banks
in the dropdown.
Appends (Mobile money) or similar label to bank names that aren't
regular bank accounts (nuban/ghipss), helping users distinguish
e.g. Safaricom M-Pesa from traditional banks.
@musale musale changed the title Feat/subaccounts Fix subaccounts May 26, 2026
musale added 3 commits May 27, 2026 01:47
- ServiceEditView handles all fields (basic, integration, security, revenue sharing)
- Updates Paystack subaccount if code exists and bank details change
- Edit button added to service detail page topbar
- URL route: /dashboard/services/<slug>/edit/
- Add channels param to initialise_transaction()
- Define DEFAULT_PAYMENT_CHANNELS including apple_pay
- Pass channels in both public and API payment flows
- Fix test_dashboard_refund_flow mock (sync _make_paystack_request)
@musale musale merged commit 8ab4001 into main May 26, 2026
2 checks passed
@musale musale deleted the feat/subaccounts branch May 26, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant