-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stripe integration #38
base: main
Are you sure you want to change the base?
Conversation
<div onclick="switchPlans('{{ $plan->plan_id }}', '{{ $plan->name }}')" class="inline-flex items-center justify-center w-full px-4 py-4 text-base font-semibold text-white transition duration-150 ease-in-out @if($plan->default){{ ' bg-gradient-to-r from-wave-600 to-indigo-500 hover:from-wave-500 hover:to-indigo-400' }}@else{{ 'bg-gray-800 hover:bg-gray-700 active:bg-gray-900 focus:border-gray-900 focus:shadow-outline-gray' }}@endif border border-transparent cursor-pointer focus:outline-none disabled:opacity-25"> | ||
Switch Plans | ||
</div> | ||
@if (env('CASHIER_VENDOR') == 'stripe') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using env
directly in your project is discouraged. Wave has a config you can add to.
A new stripe
key for Stripe specific configurations would be better to add if you need to access Stripe specific enviroment variables.
A billing.vendor
config option could use the env('CASHIER_VENDOR')
so it'll be easy to check which vendor is installed by using config('billing.vendor')
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's a good option. I choose .env because there are all the config there in just one place, but we can move it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I've built it in that way because it won't take effect with any current Wave config. So there is no conflict if you don't have any of the new Stripe .env vars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, Laravel applications have a lot of config files. Mainly because it's the suggested approch for retrieving enviroment variables to only use env
in config files, and most Laravel projects follow this standard.
Most of the time you won't have to even reach into config files, you simply add the config options you want in your enviroment files. That's probably one of the reason for this two-step approach.
If you have a config that points to the enviroment variables you can update the config with new options as much as you want without conflicting with already set options.
For application specific configurations I usually create a new config file matching the project name, that keeps things nice and separated IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there is no conflict if you don't have any of the new Stripe .env vars
The second parameter to the env
function is for default values, e.g. env('CASHIER_VENDOR', 'paddle')
would return paddle
if CASHIER_VENDOR
was blank or isn't set.
I like this a lot, thanks @magarrent, if we merge this in, can we get some help supporting this as well 😄 Just want to make sure because one of the main reasons we excluded (stripe) was that it caused more tickets than it was worth. As you'll notice the Paddle integration is custom (not using cashier) and super duper simple. (You are a subscriber or not) Stripe brings in a ton of options (which is great and bad at the same time). Products, Tiered Pricing, etc... Let me know your thoughts and if you are willing to help out. Appreciate it! |
Co-authored-by: Kim Hallberg <hallberg.kim@gmail.com>
Co-authored-by: Kim Hallberg <hallberg.kim@gmail.com>
Hi @tnylea thanks, mate! The idea is that you can choose between Stripe or Paddle when you install Wave. This PR uses Stripe checkout for the initial payment, and then you can manage your subscription via Billing Portal. So for now it's really "simple". It's just a "starter kit", like Wave. I had a lot of problems with Paddle verifications, and they have a poor API and almost no existing 3rd part integrations. Also offering both options, Wave will reach a lot of more people that prefer Stripe than Paddle. It's a first PR, so maybe it's not perfect hahaha, but I'm using it right now and testing in ActionForms.io, and looks good. |
I don't think @tnylea is asking what the potential benefits of supporting both Paddle and Stripe are. I think he's more concerned about the technical debt that would come from supporting both vendors, hence the question.
|
Co-authored-by: Kim Hallberg <hallberg.kim@gmail.com>
Co-authored-by: Kim Hallberg <hallberg.kim@gmail.com>
…tripe-integration
As @magarrent mentioned, this is quite a simple integration using Stripe's billing portal. As long as tiered pricing, etc. is avoided, I don't see this functionality causing many issues or a need for excess support, aside from future API alterations on Stripe's end. Stripe is much more prevalent than Paddle, so this payment integration would definitely open the door to many more users of the Wave boilerplate and, personally, would be a very welcome addition. |
@magarrent Looks great! I just tested that everything works good with this PR, can you fix that Merge conflict in the You'll see that I've also updated the 🤣 this has kind of come full circle. Wave v1 only supported Stripe and I removed it to clean up some code and included Paddle. But I think @magarrent you are right that Stripe seems to be more preferred over Paddle so hopefully this will open it up to a lot more people using it 👍 Great job on the PR, sorry it took awhile to get merged in, I wanted to test that everything was working correctly before committing to this. I have some cool ideas for new features in V3, will probably schedule something for around middle of this year 🕺 |
I didn't see the stripe integration documentation. Is it still working? |
Based on this pull request(thedevdojo#38), I think Devdojo team decided to add Stripe support (which I'm so happy about), but I cant see some of the commit's made by `https://github.com/magarrent/wave`, in Wave. It seems like Stripe has only been partially supported in Wave. Is that the case? If so, is there any upcoming plans to complete it?
Hoping for this too! |
Someone mentioned in Discord, that because of the Paddle integration, they will migrate to Cashier (Laravel's package). |
Oh? I wouldn't mind using a laravel package.
…On Tue, Feb 27, 2024, 1:32 AM Gabriel Kanev ***@***.***> wrote:
Someone mentioned in Discord, that because of the Paddle integration, they
will migrate to Cashier (Laravel's package).
—
Reply to this email directly, view it on GitHub
<#38 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQLQ4F6H5HX4SYCJ6VCWHKLYVWDYFAVCNFSM5KBEXLWKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGU4TIMZZGMZA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I assume this was never merged nor were the conflicts fixed? |
But then again, wave was given up on in favor of something else. It seems this happens a lot at DevDojo where they release something with just one or two versions and they have moved on to something else. It's like they can never make up their mind lol. Originally it was only PHP products being released. Now? Now it is almost exclusively JS or some sort of JS framework. |
👍 |
We do plan to work on Wave v3. Also, why this has not been merged, here are some thoughts from Taylor Otwell himself regarding Cashier: We might reconsider using Cashier in v3 though. |
Is there a public plan/roadmap or simular regarding Wave v3? |
We just started a discussion about v3 here: feel free to make any suggestions! |
Bobby, that was not meant as a shot at y'all. I remember us having a conversation and being told it was being replaced with Foundation? I think even Tony chimed in regarding Wave. Did y'all change your minds? Will the new wave have an upgrade path from v2? I assume yes. |
Hey there!
I'm testing the new Stripe integration that I've built. It works fine but test some of you and see if I missed something.
Hope this will help a lot of people!
This PR does not replace paddle integration, I designed it for work with both integrations, just choose what you want.