Comments (10)
I've prepared a solution for the v1 release, planned for end of the month. 🤞
from cashier-mollie.
The $processNow = true
flag looks like a great idea. This way we can run the Cashier command, for example, daily and group payments per billable model, cutting costs. It will also support the anchor date feature which is is not yet implemented, but a fallback would be to run the Cashier command.
from cashier-mollie.
For clarity the flag will be named invoiceNow
.
processNow
set to false
suggests that the quantity is not instantly updated. Which it is, it's only invoiced later.
from cashier-mollie.
Hi @MSnoeren ,
Have you checked in the Mollie dashboard that 10 payments were created? They should be all combined into a single OrderItem, not 10.
If it's 10 OrderItems, this would only occur on the first payment, on subsequent payments the scheduler will combine it into a single Order and payment. (Would still not be ok obviously!)
from cashier-mollie.
Currently I'm triggering the updateQuantity
function each time a customer adds or removes a product. This means it'll create a payment for every quantity change. Using updateQuantity
makes sure the quantity is always the same as the amount of active products. The payment is instantly processed and sent to Mollie; my testing-dashboard confirms this. The user has a valid mandate.
The code for this behavior can be found at;
cashier-mollie/src/Subscription.php
Line 660 in 61a3f0b
The updateQuantity
function requests the restartCycleWithModifications
function which then requests the order to be processed.
from cashier-mollie.
Perhaps we could add a default flag processNow = true
?
from cashier-mollie.
Alternatively you could place a layer in between (Front-end JS?) to delay the update to the back-end, capturing all 10 updates in a single request.
from cashier-mollie.
What do you think, should processNow
default to true
or false
?
Given your use case, I'm leaning towards false
.
from cashier-mollie.
I think it should be true
, as the current behavior is also true
. I'm switching a lot of quantities with small costs, so it's useful to me to cut the costs and push the payment into one large one, but I can imagine that other applications want to bill their customers immediately whenever they add, for example, another user at a higher cost.
from cashier-mollie.
Ok, we'll take that route for now.
from cashier-mollie.
Related Issues (20)
- Same plan with different intervals HOT 1
- Questions HOT 3
- First 1500 customer one year €25 discount / Exclude customers from discount when they have already have one HOT 3
- Guzzle timeout when trying to create a new customer. HOT 5
- PHP8 update confilct HOT 1
- Recurrent payment HOT 17
- Testing webhooks locally HOT 3
- Question about events HOT 6
- Get checkout URL for failed order payments HOT 1
- user id rounded up HOT 1
- Question regarding API KEY HOT 1
- Not Understanding HOT 1
- See when a subscription is up for renewal HOT 1
- Event OrderInvoiceAvailable is dispatched multiple times HOT 1
- 1305 SAVEPOINT trans2 does not exist HOT 1
- Charge based on days of the month left HOT 1
- How to create different pricings for subscriptions based on user country? HOT 2
- Current subscription end date HOT 5
- Is it possible to mandate multiple subscriptions in one initial payment HOT 3
- Interval of subscription not updating
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cashier-mollie.