laravel-cashier-mollie
laravel-cashier-mollie copied to clipboard
Update documentation needs updating for custom webhookcontrollers
Hello,
In the previous version of this library custom webhook controllers were as far as I'm aware a popular way of handling the webhooks. Now in V2 the library handles this for us. Which is great! However since one time charges were not supported in V1 I used this in conjuction with the regular mollie library, hence the need for a custom webhook controller. Now that I want to update the library to v2 the basewebhookcontroller abstract class was updated to change the getPaymentById method to getMolliePaymentById (correct me if I'm wrong).
Now here is where the trouble starts, I start with updating the method to the new one and parse the payment Id in its parameter. I did read and apply the upgrade documentation and ran the migrations which ran successfully.
Starting a new subscription (with the newSubscription method) for someone without a mandate_id results in the following error in the logs:
local.ERROR: Undefined property: stdClass::$actions {"exception":"[object] (ErrorException(code: 0): Undefined property: stdClass::$actions at /var/www/html/vendor/mollie/laravel-cashier-mollie/src/FirstPayment/FirstPaymentHandler.php:103)
[stacktrace]
Then followed up by this one:
local.ERROR: Call to a member function getEndOfNextSubscriptionCycle() on string {"exception":"[object] (Error(code: 0): Call to a member function getEndOfNextSubscriptionCycle() on string at /var/www/html/vendor/mollie/laravel-cashier-mollie/src/FirstPayment/Actions/StartSubscription.php:182)
Since these errors seems related to the end of the subscription cycle I am afraid this would also apply to renewals. I cannot recreate that however since I can't get a new one to work.
Any help is greatly appreciated!