Expected Behavior
When a merchant subscribes to the annual plan and then subscribes to the monthly plan, the next billing_on (API response) should be the current date (given that there are no trial days).
Current Behavior
When a merchant subscribes to the annual plan and then subscribes to the monthly plan, the next billing_on is next year. If we credit/refund the whole year, the user will be able to use the app for the entire year for free.
Failure Information
This happens in laravel-shopify/src/Actions/GetPlanUrl.php:79.
Steps to Reproduce
- The merchant accidentally subscribes to the annual plan and asks for a refund/credit.
- The app owners issue a refund/app credit and cancel the current annual plan.
- The merchant subscribes to the monthly plan.
This results in free usage for one year because we need to set the replacementBehavior to APPLY_IMMEDIATELY.
Context
- Package Version: v22.0.1
- Laravel Version: Laravel Framework 11.22.0
- PHP Version: PHP 8.3.11
- Template Engine: React
Failure Logs
