Skip to content

[MerchantRegistry] Add suspend_merchant function separate from update_merchant #33

@JayWebtech

Description

@JayWebtech

Overview

Suspending a merchant (e.g. for fraud) currently requires calling update_merchant(active: Some(false)) — but only the merchant itself can call update_merchant (it requires merchant auth). Admins cannot currently suspend a merchant.

Technical Requirements

  • Implement suspend_merchant(admin: Address, merchant_id: Address, reason: String).
  • Require admin auth and verify admin == stored_admin.
  • Store suspension reason and timestamp on the Merchant struct.
  • Ensure create_payment (in PaymentProcessor) checks that merchant is active and not suspended.
  • Add reinstate_merchant for admin to lift suspension.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions