mollie / laravel-cashier-mollie

Official Mollie integration for Laravel Cashier
https://www.cashiermollie.com/
MIT License
136 stars 44 forks source link

Getting refund quantity #252

Closed ignaciocunado closed 2 months ago

ignaciocunado commented 3 months ago

I am implementing a feature which allows users to change their subscription plans. When users upgrade their plan, a refund is created for what's left of this cycle and a new order is automatically created.

I want to display how much the user will pay today (new plan price - refund amount). However, the method protected function reimbursableAmount() on subscription is protected, so I can't use that in combination with getCycleLeftAttribute().

I propose making reimbursableAmount() public so it can't be accessed or adding a getter method which calculates the value for the unused time.