Closed CodeAndWeb closed 4 years ago
More questions....
Dates in this test are 2020-01-01 and 2020-01-10 (differing from the values in the first message)
Some notes on testing/debugging:
cashier:run
?mollie()->payments()->get($paymentId)->_links->changePaymentState()
More info here.
Closing this for now, let me know if it should be reopened.
How exactly should metered billing work?
I am writing a processor as you suggested but some things are quite strange. In my test I do the following:
subscribeToPlanAndProcessPayment() is a function that triggers a subscription
handle() in my processor is called once with the following order Item:
And the connected subscription:
My questions are:
1) Why is it only called once for the swap() and not for the initial payment? 2) Why is cycle_started_at and cycle_ends_at both "2020-04-10 00:00:00" ? Should start and end not differ? 3) How am I supposed to know for which period I have to get the metered billing details for?
Or am I doing it wong and I have to create my own order items before the processor is called?