1

So, I have been interested in Laravel spark for some time. I am wondering if it supports taking a one-time payment or if you would have to implement it by taking a separate payment within your application then subscribing them to another plan?

I am wanting to gather some information about this before i go ahead and commit to licensing spark

Essentially I am looking to offer a monthly/yearly package + a lifetime plan. Is this supported?

Tried looking around the documentation for any mention of a single time payment.

Also tried watching nearly every startup video to see if there was any mention of any configuration option for it someone had found within the Spark Service provider.I'm pretty convinced unless someone can give me an example that you cannot do it by default. That being said, it's only a limitation of the boilerplate at best and I'm sure it could be integrated in some way using another feature of Laravel.

Anybody have any experience with this?

James mcconnon
  • 579
  • 5
  • 23

1 Answers1

0

I am in the process of doing this myself and am using Stripe as the payment processor.

Spark documents how you can customize functions by using Spark::swap, but I have run into an issue when trying to do this the 'correct' way. For the moment, I have added the following code directly to the Subscribe class in: spark/src/Interactions/Subscribe.php

$user->charge(899); // use this if you don't want an invoice generated
$user->invoiceFor('First month pro-rated', 799); // use this if you want an invoice generated.

The problem if I swap out the handle method is that $this is not then valid.

I should add that this has nothing to do with the user's subscription... it is purely a one-off charge. So if you need to be able to validate if they made payment, you'll need to capture this information in a different way.

Swissmant
  • 519
  • 4
  • 8