The SubstractPaymentsModule trait manages payment deductions for services within a subscription model. It includes time constants representing subscription intervals and a custom result type for operation outcomes.
DAILY_EPOCH: Represents a daily interval for subscriptions.WEEKLY_EPOCH: Represents a weekly interval for subscriptions.MONTHLY_EPOCH: Represents a monthly interval for subscriptions.CustomScResult<T, E>
Ok(T) for successful operations or Err(E) for errors.is_err() -> bool
unsafe unwrap_unchecked() -> T
Ok.DAILY_EPOCH, WEEKLY_EPOCH, and MONTHLY_EPOCH can be used to configure subscription intervals.CustomScResult provides a safe way to handle errors across the contract's functions.substract_payment(service_index: usize, user_id: AddressId)
substract_specific_token(user_id: AddressId, token_id: EgldOREsdtTokenIdentifier, amount: BigUint)
substract_any_token(user_id: AddressId)