Jump to content

Can someone point me in the right direction with adding Square SDK to Processwire


Jacques
 Share

Recommended Posts

Hello, I'm primarily a graphic designer with some intermediate php coding skills. I love everything about Processwire; how easy it is to get up and running, making a lot of things that are hard (at least to me), very easy to implement. In fact, it makes me look like a genius most of the time ( I deal with a lot of Imposter Syndrome, but anyways . . .). I'm trying to figure out how to install Square's SDK and API into a processwire site I'm developing for my wife. I've read a lot of tutorials and articles, and I'm afraid to make some horrible error that will break what I've already built (I just recently learned how to use Regions with confidence). I don't know if I should install Composer or not ( I don't understand Composer, do I install only locally on my computer, or actually have to install it on the server?) or do I just manually install the SDK on the server itself, but where? Not the root folder, I know that much and how do I call it in the files (in the config.php or in the _init.php). She's an esthetician, I'd like users to be able to book appointments on the site and her able to make those appointments to deposit a percentage to hold the appointment. So that is my issue. Would love some help and keep learning to get better with using Processwire.

  • Like 1
Link to comment
Share on other sites

Hi @Jacques! Welcome to the forums!

I'd say the easiest would be to install it with composer if you are able to install composer and I'd argue that it's worth the investment in time to learn a bit of composer! At least just to run a composer require command, which is all you need right now!

Have you seen this blog post??

https://processwire.com/blog/posts/composer-google-calendars-and-processwire/#installing-the-module-with-composer

You don't need to install composer on the server, composer will download dependencies  in a folder called /vendor in the installation's root folder and you can upload this folder just fine to the server. 

I would be really hard to break the site by just doing "composer require square/square", but in any case it does happen after that command, just delete the vendor folder.

Are you familiar with CLI tools?? Maybe it's the first step! To learn how to execute a CLI program?? Are you on mac or windows?? If you're on mac I might be able to help.

I see a manual installation guide to on square docs page! Did you see that? It might suite best with the knowledge you have now, though you'd need to adapt it to your own templates. 

4 hours ago, Jacques said:

She's an esthetician, I'd like users to be able to book appointments on the site and her able to make those appointments to deposit a percentage to hold the appointment.

Development aside, looking at the actual problem, maybe Pro module FormBuilder would be helpful if you have the budget to spend on it, and instead of Square you could use Stripe and that might might just be and almost plug and play solution depending on additional logic that do want to handle. 

Don't hesitate to come back and ask even if it seems like something "super obvious" or "dumb" in your view,  this is a welcoming community for everyone no matter their experience. 

  • Like 3
Link to comment
Share on other sites

Thank you so much. Another reason why Processwire is great, because of the community here. I will re-read the post about installing the module with composer now that I know that I don't need to also upload Composer or install Composer on the server. Thank you for that. 

I have used CLI tools before when I would play around with Linux Mint or Ubuntu, not so much on Windows (which is what I use now because I need Photoshop).

As for something else other than Square, my wife is pretty committed to using Square.

Thank you so much. 

  • Like 1
Link to comment
Share on other sites

16 hours ago, Jacques said:

Another reason why Processwire is great, because of the community here.

Yeah mate! I was there in your exact same position, way less inexperienced  when I arrived here barely knowing programming, web development, etc.. and here I am, breaking less things by the day thanks to everyone around here. ?

Let me know how it goes! 

By the way, what development environment are you using??

  • Like 1
Link to comment
Share on other sites

1 hour ago, elabx said:

Yeah mate! I was there in your exact same position, barely knowing programming, web development, etc.. and here I am, breaking less things by the day thanks to everyone around here. ?

 

That's awesome! 

Locally, I'm using Windows 11, with Xamp, Sublime Text and Filezilla. The server runs standard Linux. Years ago I had some practice with Git, but it's been so long that I forgot a lot of it. I know enough PHP and Vanilla Javascript to get into trouble, but not enough to get out of trouble in most cases. But I'm trying!

I'll let you know how it goes. Thanks for the confidence boost.

  • Like 2
Link to comment
Share on other sites

33 minutes ago, Jacques said:

Windows 11, with Xamp, Sublime Text

Take a look at these alternatives:

  • Laragon (much better and easier setup than Xampp) was my favorite before I stumbled upon
  • ddev (which requires Docker Desktop and WSL2) 
  • VSCode (way better for programming than Sublime)
  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
On 7/15/2022 at 9:27 AM, dotnetic said:

Take a look at these alternatives:

  • Laragon (much better and easier setup than Xampp) was my favorite before I stumbled upon
  • ddev (which requires Docker Desktop and WSL2) 
  • VSCode (way better for programming than Sublime)

I'm going to play with Laragon and start using VSCode and see how I do. Thank you. Once I get comfortable, maybe I'll start working with ddev.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...