• Hi friends,
    I’m in school for web development, and part of this education requires an internship. So many people around me want to use WordPress as a platform to build a site on, yet I have been resistant because I’m learning the real code (HTML, CSS, JS, and C#) and wordpress has mostly been too simplistic. Now I’ve been given a task to integrate a Square payment service to an existing site built with WordPress and I am being asked to integrate it with the hard code. In other words, NOT using a plugin.
    Obviously a page is built somewhere with PHP then converted into HTML. I’m wanting to find one specific page and edit it that page to include the Square code, but I don’t know where to begin. Additionally, I want to learn how to customize the backend so that I can utilize my education to engage in the backend of WordPress.
    Can anyone provide some insight to this? Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You’ll have to write a plugin to integrate Square payments into WordPress. That’s how you extend core features.

    >> I’m learning the real code (HTML, CSS, JS, and C#) and wordpress has mostly been too simplistic <<

    Pardon me while I fall over laughing.

    As this is schoolwork, I probably should not point out to you that there are a number of plugins from which you can get an idea of how to do it.

    Moderator bcworkz

    (@bcworkz)

    If WP is so simple, why are you here? 😛

    I’m yanking your chain, I know what you meant, you’re fine.

    To invoke custom code for a specific page, you can create a custom page template for the purpose. Unless you custom built the theme, you may wish to create a child theme to contain your custom work.
    https://developer.wordpress.org/themes/template-files-section/page-template-files/

    Payment gateways can be problematic to develop simply because they involve financial transactions. If your gateway is not absolutely bombproof, people are going to get very angry and may want to seek damages if things don’t go as planned. In this particular case, I recommend using an existing plugin suitable for the purpose. If you like, you can examine what it does and learn from it. Even develop your own version and try it out in sandbox mode. But for real transactions with real customers, I’d leave it to a professionally developed plugin if I were you.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Just to add to the above, plugins are really the way to go, there’s a reason why there are so many. 🙂

    No need to re-write something that’s already been built, these are all free: https://wordpress.org/plugins/search/square/

    With that said, if you’re doing this to learn, that is admirable, no fault there. I recommend following along with https://developer.wordpress.org/plugins/ and referencing the code of those existing free and open source Square plugins for hints.

    Thread Starter jpesta

    (@jpesta)

    Forgive me when I say too simplistic. I was more mentioning how everything usually drags and drops. Of course, there are some challenges to WP, but coming from an educational background of programming, the typical WordPress requests have been not so exciting.

    Thank you all for your contribution. I get there are already plugins, and I’ll perhaps go that route, but I want to try and build one first.

    I do have a follow-up question though. When using FTP, where is the data stored for the individual pages/posts?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    You don’t use FTP to create posts or pages. When using FTP to upload items, everything is stored on the file server as per File Transfer Protocol’s (FTP’s) specification.

    When writing Posts or Pages, they are stored in the MySQL database per the schema linked to above.

    Forgive me when I say too simplistic. I was more mentioning how everything usually drags and drops. Of course, there are some challenges to WP, but coming from an educational background of programming, the typical WordPress requests have been not so exciting.

    Perhaps you’re using “simple” when you should be saying “easy”. And seen from the standpoint of an end-user who just wants to write words in a box and see their words appear on the internet, WordPress definitely is easy.

    And it’s easy (or simple, if you insist) because lots and lots of independent developers have gone through a great length to create those drag-and-drop experiences you talk about.

    But as someone learning to become a WEB DEVELOPER, you should be looking at WordPress (or any other tool) with the lense of “how can I CREATE such and such”. You should be asking yourself “how can I create such a plugin that is so sleek and easy to use”, and not “this plugin is too easy to use and way below my level”.

    You should be looking at things from the standpoint of a CREATOR who creates the tools, not a CONSUMER who only uses what others have created.

    And from that viewpoint, it seems you have a long journey ahead. But I fear your “resistance” and internal biases may be holding you back.

    Good luck!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Backend editing for Square SDK’ is closed to new replies.