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
Adjust for Paddle Billing v2 #100
Conversation
Is there a way to use "v1" of paddle billing for now? It seems like paddle have fully migrated to v2 After installing the project and test the billing page I got the error:
|
I think that what you could do is reach out to them and ask for access to Paddle Classic so you could use the old API version. |
Hello @bobbyiliev, First off, I want to express my gratitude for this Pull Request. Although I understand it's still in draft mode, I found your contribution immensely helpful in adjusting my own code, especially with the significant changes in Paddle's version 2. I have made several edits to your initial proposal to align more closely with Paddle's documentation, but I want to emphasize that the majority of your work was already very well executed. Additionally, I'd like to offer my assistance or any ideas if you need them. Please feel free to let me know if I can contribute in any way. Your initial approach has been quite inspiring, and I'd be delighted to collaborate further on this project. Thank you again for your valuable work on this project. Best regards, |
Hey @alfreddagenais! Thanks for the great feedback! I've postponed this for a bit but planning to pick it backup after the holidays. Still debating on whether to completely switch to using the Laravel Cashier package. There has been some ongoing development for Paddle v2 but it is still under alpha release:
Totally open to suggestions here! |
Hey @bobbyiliev ! Thank you for your update and for considering my feedback. I completely understand the need to postpone due to the holiday season. I wanted to share some insights from my recent experience. Yesterday, while integrating the details from the PR, I noticed there are quite a few aspects that need to be addressed in the code to achieve a more refined version for payments, especially for Wave's consumers/developers. After thoroughly reviewing the complete documentation of Laravel Cashier (https://laravel.com/docs/10.x/cashier-paddle), I must say I'm really impressed with this package. Notably, it's already advanced to version 2.0.4 (2 days ago... not just the 2.0.0-alpha.3). In my opinion, incorporating the Cashier-Paddle package into Wave could be highly beneficial. Given the extensive features it already manages within the Laravel community, it seems counterproductive to rewrite these parts. Moreover, its webhook event management and validation features (https://github.com/laravel/cashier-paddle/releases/tag/v2.0.4) are particularly appealing. Based on these factors, I have decided to adjust my code to utilize Cashier-Paddle. It simplifies the process significantly, reducing the amount of code and potential sources of error. This is especially crucial considering the evolving nature of payment engines. I believe leveraging Cashier-Paddle could streamline our development process and enhance the overall functionality of Wave. Looking forward to hearing your thoughts on this! Best regards, PS: Just a quick note, for me is missing a issues tab in github wave project. You can track the todo, improvement, etc. And the community looking the the wave package. |
Hi @bobbyiliev
Haven't checked on the consequent implications of these changes yet. I am new to both Laravel and Wave. |
b0e0a3c
to
1715318
Compare
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.
Here are some page speed improvement suggestions.
@@ -1,11 +1,24 @@ | |||
<script src="https://cdn.paddle.com/paddle/paddle.js"></script> | |||
<script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script> |
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.
<script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script> | |
<script src="https://cdn.paddle.com/paddle/v2/paddle.js" defer></script> |
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.
This does not seem to be working unfortunately:
Uncaught ReferenceError: Paddle is not defined
at pricing:984:5
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.
Yes, I guess so. I didn't manage to combine my suggestion in a single entry. You need to defer the script after this one too (#100 (comment)).
We need to make sure that we try to instantiate Paddle after the paddle script is loaded.
@@ -1,11 +1,24 @@ | |||
<script src="https://cdn.paddle.com/paddle/paddle.js"></script> | |||
<script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script> | |||
<script> |
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.
Extract its contents to a dedicated js
file and defer its loading as well.
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.
All looks great to me. Excited to get this merged in 👍
Preparing the upgrade for the Paddle v2 billing changes: