This post covers new changes and improvements to Spike ranging from v1.4 to v1.6 (latest).
Full Laravel 10 support
Starting with v1.4.0, Spike now fully supports Laravel 10!
Starting with v1.5.0, Spike now supports using Stripe Checkout for the final payment step. Once the user has selected the products or subscription plan they want on Spike, they can be redirected to Stripe Checkout to complete the payment. This has a number of benefits:
- Users can use a wider range of payment methods, such as Apple Pay, Google Pay, Klarna, etc. You can configure the available payment methods in your Stripe account, and the methods available will appear automatically based on the user's location/availability.
- Users will enter their payment details on Stripe, which might be a more familiar environment for your customers, instilling confidence in the purchase.
Let's see how to set it up.
First, you'll need to update your
config/spike.php or publish it if you haven't. There's now a new configuration section specifically for Stripe Checkout.
When you switch
true, your users, instead of seeing the default checkout modal within Spike, will be redirected to your Stripe Checkout to complete the payment.
After the payment is complete, they will be redirected back to Spike billing to acknowledge their purchase with a "thank you" page.
Note: Using the Stripe Checkout strategy, invoices will no longer be generated automatically, but they can be enabled by setting the
stripe_checkout.generate_invoices configuration to
You can read more about this feature in the docs.
Thank you page redirects
After your users complete the purchase of credits, they will be shown the "Thank you" page in Spike. If you'd like to show a different page, or redirect to a different page automatically after some time, you can now do that!
Spike v1.6.0 introduces the ability to redirect your users elsewhere automatically after a successful purchase.
This can be set up with the new
Spike::redirectAfterProductPurchaseTo(string|callable $url, int $delayInSeconds = 0) method.
Add it to your
AppServiceProvider::boot() like so:
The first argument even accepts a callback, which gets the shopping Cart instance in case the final redirection page depends on the products purchased.
And if you don't want to show the "Thank you" page at all, just set the delay to zero seconds!
Custom credits icon
The default icon for credits is a few coins stacked on each other. Suits well in most cases, but perhaps not always! If you'd like to use a different icon to represent your credits, you can easily configure the SVG/JPEG/PNG image that's used for the icon across all of Spike.
This is a new config in the "theme" section of
It will put the icon in the
<img src="..." /> tag, so make sure the path provided is accessible on the web. Here's an example of what it would look like with a custom icon:
In summary, Spike's v1.4 to v1.6 updates brought numerous improvements including full Laravel 10 support, integration with Stripe Checkout for a broader payment method selection, customizable "Thank you" page redirection, and a customizable credits icon. The updates aim to improve user experience and offer more configurability.
Don't miss out on these exciting new features! If you haven't already, consider securing a license for Spike and reap the benefits of its robust features designed to enhance your payment process. Click here to get started.