Skip to content

Add dispute events, subscription engine, batch verification, and relative stream creation#140

Merged
Pvsaint merged 2 commits into
MetroLogic:mainfrom
success-OG:feat/payment
Apr 28, 2026
Merged

Add dispute events, subscription engine, batch verification, and relative stream creation#140
Pvsaint merged 2 commits into
MetroLogic:mainfrom
success-OG:feat/payment

Conversation

@success-OG
Copy link
Copy Markdown
Contributor

closes #108
closes #109
closes #110
closes #128

Summary

Implements 4 new features for the FluxaPay payment processor contract.

Features

1. Fee Structure Customization

  • Added FeeConfig struct with configurable platform fee (bps), fixed fee, and custom fee recipient
  • Merchants can now configure transaction fees via register_merchant and update_merchant
  • Added calculate_fee and get_fee_recipient helper functions for fee computation

2. Payment Metadata Support

  • Added metadata: Option<Map<String, String>> field to PaymentLink
  • Merchants can attach arbitrary key-value metadata to payment links
  • Metadata is accessible upon payment completion

3. Atomic Settlement & Swap

  • Created DexRouter interface for DEX integration (Soroswap-compatible)
  • Added swap_and_pay function for atomic token swap and payment creation
  • Supports custom DEX router address and configurable swap paths

4. Recipient Address Rotation

  • Added RecipientStream struct for streaming payment management
  • Implemented update_recipient with recipient authentication
  • Updates RecipientStreams index atomically
  • Emits RecipientUpdated event for transparency
  • Added create_recipient_stream and claim_from_stream for streaming payments

Files Changed

  • fluxapay/src/merchant_registry.rs - FeeConfig, fee_config field, updated functions
  • fluxapay/src/payment_link.rs - metadata field, updated create_link
  • fluxapay/src/dex_router.rs - New DEX router interface
  • fluxapay/src/lib.rs - swap_and_pay, update_recipient, RecipientStream, PaymentConfig

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 28, 2026

@success-OG Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Pvsaint Pvsaint merged commit fe527ed into MetroLogic:main Apr 28, 2026
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.

feat: Implement update_recipient for address rotation Atomic Settlement & Swap Payment Metadata Support Fee Structure Customization

2 participants