• erio's avatar
    fix: resolve 3 code review issues in allow_user_refund · c14d7393
    erio authored
    1. PrepareRefund: block refund on provider instance lookup failure
       instead of silently skipping permission check (medium severity)
    
    2. UpdateProviderInstance: allow enabling refund_enabled and
       allow_user_refund in the same request by checking req.RefundEnabled
       value before falling back to DB read
    
    3. ExecuteRefund: only revoke subscription on ErrAdjustWouldExpire,
       abort on other errors (DB failure, not found) instead of
       unconditionally revoking
    c14d7393
payment_refund.go 12.1 KB