Closed mikelmao closed 4 years ago
Confirmed, it's a bug.
It seems The FirstPaymentSubscriptionBuilder is not using the firstPayment
overrides from the Plan.
Will look into this.
I have created my first ever pull request with the fix. Im not sure if i did it right, i followed a youtube video how to make pull requests on github xD @sandervanhooft
Just pushed a fix to develop
. Your PR was definitely heading in the right direction, but I needed additional tests and some more to fix the whole problem.
I have implemented plans being loaded from the database per issue #69 which seems to be working fine. Though i have added the column firstPaymentRedirectUrl (varchar) and it does not seem to load this.
My DatabasePlanRepository looks like this:
And my plan model as followed:
As you can see i have added the firstPaymentRedirectUrl and setFirstPaymentRedirectUrl methods. Though upon succesfully making a payment through the redirect URL, it will send me to my localhost, which seems to be loaded from config/cashier.php file
'redirect_url' => config('app.url'),
My app.url is http://localhost
Any clues on how I can achieve loading the redirect url based on the plan's firstPaymentRedirectUrl in the DB?
EDIT: Formatted code