Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

one off charge (invoiceFor) #42

Open
Tjoosten opened this issue Sep 1, 2019 · 17 comments
Open

one off charge (invoiceFor) #42

Tjoosten opened this issue Sep 1, 2019 · 17 comments
Labels
enhancement New feature or request

Comments

@Tjoosten
Copy link

Tjoosten commented Sep 1, 2019

Hi,

I'm wondering is there a method to process one time charges.

@marijnbent
Copy link
Contributor

This will be added in the future according to the docs
https://github.com/laravel/cashier-mollie#one-off-charges

@sandervanhooft
Copy link
Collaborator

True! I'll hijack this ticket as a reference.

Also, feel free to help me out with a PR. My focus primarily shifts to Spark for the next month.

@sandervanhooft sandervanhooft changed the title Question about charges. oneOff charge Sep 3, 2019
@sandervanhooft sandervanhooft changed the title oneOff charge one off charge (invoiceFor) Sep 3, 2019
@jelleroorda
Copy link
Contributor

I'm going to try to spare some time this weekend to hack at this. I'll keep you guys posted.

@sandervanhooft sandervanhooft added the enhancement New feature or request label Sep 10, 2019
@sandervanhooft
Copy link
Collaborator

I'd like to stay as close to Cashier for Stripe as possible, so let's start there.

Cashier for Stripe offers the following on the Billable trait for one off charges (I'm trying to understand the differences):

/**
     * Make a "one off" charge on the customer for the given amount.
     *
     * @param  int  $amount
     * @param  string  $paymentMethod
     * @param  array  $options
     * @return \Laravel\Cashier\Payment
     */
public function charge($amount, $paymentMethod, array $options = [])

    /**
     * Add an invoice item to the customer's upcoming invoice.
     *
     * @param  string  $description
     * @param  int  $amount
     * @param  array  $options
     * @return \Stripe\InvoiceItem
     */
public function tab($description, $amount, array $options = [])

    /**
     * Invoice the billable entity outside of the regular billing cycle.
     *
     * @param  array  $options
     * @return \Laravel\Cashier\Invoice|bool
     */
public function invoice(array $options = [])

    /**
     * Invoice the customer for the given amount and generate an invoice immediately.
     *
     * @param  string  $description
     * @param  int  $amount
     * @param  array  $tabOptions
     * @param  array  $invoiceOptions
     * @return \Laravel\Cashier\Invoice|bool
     */
public function invoiceFor($description, $amount, array $tabOptions = [], array $invoiceOptions = [])

@sandervanhooft
Copy link
Collaborator

sandervanhooft commented Oct 3, 2019

As I understand it (Cashier for Stripe):

  • charge() and tab() result in charges to be processed in the upcoming bill, so the billing cycle is left intact.
  • invoice() and invoiceFor() trigger payments directly, without delay.

@sandervanhooft
Copy link
Collaborator

Ok, the laravel docs state that the difference is just charging with or without an invoice... 😕

@sandervanhooft
Copy link
Collaborator

sandervanhooft commented Oct 3, 2019

Checking this with Dries.

On another note, I'd like to either return a RedirectToCheckout, an Order (or an OrderItemCollection), depending on whether the customer has registered a valid payment mandate.

This behavior is similar to starting a new subscription.

@driesvints
Copy link
Member

charge: single charge without an invoice
tab add a line to the upcoming invoice
invoice create a new one-off invoice
invoiceFor create a new one-off invoice with the specified amount

@sandervanhooft
Copy link
Collaborator

Thanks @driesvints !

@rabol
Copy link

rabol commented Apr 29, 2020

any ETA on the one-off feature ?

@Hesesses
Copy link

Hesesses commented May 3, 2020

Thank you very much for creating the cashier package for mollie 🙏

For our service, one-off feature is required, would be nice to hear any ETA.

@jelleroorda
Copy link
Contributor

@rabol @Hesesses

I (re)started working on it this morning, since I'm currently having a little more free time. Since it has been a while since I initially started working on it I simply dropped everything, and created a new fork from development. I'm not sure when it will mergable, but I'm aiming to get the biggest part done in around 2 weeks (~17 May).

After that it will depend on feedback and Sander, so I can't really give an ETA.

@Hesesses
Copy link

Hesesses commented May 5, 2020

Thanks for quick update!

@jelleroorda jelleroorda mentioned this issue May 9, 2020
4 tasks
@JordiBaguette
Copy link

Thank you for this awesome package! Any updates on this feature?

@jelleroorda
Copy link
Contributor

Hi @JordiBaguette, you can read up on the actual status in the associated pull request. The code in the pull request works, but the final version still needs some work (especially the part of the “open tab”).

After Sander finds more time to have a look at it and reviews it, I can check if I can find some more time to process his feedback. I’m also kind of busy though at the moment, so it’s also fine with me if someone else will finish it.

@JorisDebonnet
Copy link

JorisDebonnet commented Sep 16, 2020

Great to see the progress on this. I, too, am hoping for a resolution soonish... 😊

@marijnbent
Copy link
Contributor

Let me know if I can help test!

sandervanhooft added a commit to sandervanhooft/cashier-mollie that referenced this issue Jan 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants