GithubHelp home page GithubHelp logo

Comments (10)

sandervanhooft avatar sandervanhooft commented on April 28, 2024 2

I've prepared a solution for the v1 release, planned for end of the month. 🤞

from cashier-mollie.

MSnoeren avatar MSnoeren commented on April 28, 2024 1

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.

sandervanhooft avatar sandervanhooft commented on April 28, 2024 1

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.

sandervanhooft avatar sandervanhooft commented on April 28, 2024

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.

MSnoeren avatar MSnoeren commented on April 28, 2024

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;

$order->processPayment();

The updateQuantity function requests the restartCycleWithModifications function which then requests the order to be processed.

from cashier-mollie.

sandervanhooft avatar sandervanhooft commented on April 28, 2024

Perhaps we could add a default flag processNow = true?

from cashier-mollie.

sandervanhooft avatar sandervanhooft commented on April 28, 2024

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.

sandervanhooft avatar sandervanhooft commented on April 28, 2024

What do you think, should processNow default to true or false?

Given your use case, I'm leaning towards false.

from cashier-mollie.

MSnoeren avatar MSnoeren commented on April 28, 2024

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.

sandervanhooft avatar sandervanhooft commented on April 28, 2024

Ok, we'll take that route for now.

from cashier-mollie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.