0

I'm not familiar with Drupal, really. I can dig around the admin interface and navigate the directories and find the files that I need to just fine as well.

What I'm really not familiar with is adding modules or extending modules. The site currently takes an order and sets up recurring payments through Ubercart and uses Authorize.net as a gateway. Right now, when a payment fails, a single e-mail gets sent out to the admin. We'd like to extend it to send an e-mail to the user and let them change their payment information through another page on the site.

Authorize has a service called Silent Post URL that basically just posts a carbon copy in XML to whatever URL you give it. We'd like to accept that XML, deserialize it, parse the data, send a notice to the user and give them the page for updating their information.

So, I guess it'll be two PHP pages. One for the XML API call from Authorize.net, and then one for the page for the users' to update their payment information.

Could I just create two simple pages each handling their own tasks, or should I check out properly extending a module? If it's appropriate for me to write up the pages and not have to hook them into the module, what would be the best way to handle setting up what needs to get done?

(The most experience I've had with extending a PHP site has been hacking away at someone else' poorly constructed, custom framework, so if anyone has any good resources perhaps on PHP best practices that they could share through a PM or a comment, I'd appreciate It)

(Also, I'm still getting the hang of Stack Exchange, so if this isn't appropriate please let me know. I'll delete it.)

Nathan Lutterman
  • 359
  • 1
  • 4
  • 10
  • 1
    You should really look into how to make a simple module. It's not that hard. – Florian Margaine Oct 29 '13 at 18:50
  • How are you defining 'Okay'? Are you asking if it will work, sure, why wouldnt it? – GrandmasterB Oct 29 '13 at 19:14
  • Well, since I was unfamiliar, I was looking for a bit of an explanation about standards when it comes to extending a Drupal site and what the most accepted way of implementing the extra functionality would be. Just in case I wouldn't be the guy looking at this down the line if anything needed to be changed, moved, or whatever while keeping Drupal in place, I'd like to keep it clean, simple, and understandable. – Nathan Lutterman Oct 29 '13 at 20:36

3 Answers3

2

If the new page doesn't use users from Drupal site, doesn't rely on any pages in your Drupal site, doesn't use the theme of your Drupal site and doesn't otherwise have any interaction with the site, you might want to do it that way.

I still wouldn't.

Part of using any platform is learning to work within it so you can use all the parts of it to your advantage. You're already using Drupal users and messaging which means you're using the database. You can either figure out how to use Drupal to access them or you can go build your own page with its own database settings, it's own security, figure out how to manually tie into Drupal users and messaging and hope that you don't break anything while you're in there.

Sean McSomething
  • 3,781
  • 17
  • 25
  • 1
    Thanks for the answer. From what I've been reading around and looking up, just creating a module would be the best way to go about it. Time to get me some learnin' done. – Nathan Lutterman Oct 29 '13 at 20:40
1

The problem is always the maintenance. Are you willing to patch the page every time Drupal gets patched? Are you willing to re-integrate it every time something changes?

It's a better plan to find a module that does what you need, that's still under active development. Anything else, and you're making a commitment to maintenance that will last as long as the site.

Satanicpuppy
  • 6,210
  • 24
  • 28
1

I am not too familiar with drupal either but from my experience so far many modules are built with flexibility in mind. I don't know how your site is setup but my approach would be to research and setup a test implementing a automated emailing system that links up to the admin's payment warning.There should be a module for each step.

Not sure if clear:-> I would try and fit in modules that have been shown to work before you modify or make your own. Many modules can work together (think Legos). I don't want to link to specific modules with a simple plan as I am not confident in my knowlege.

Vague Plan: use (module) Parsing API + (module) Email API + (module) Payment API though you should have it reroute to your current payment system.

So Three modules with some customization and you could have a decent solution without code.

Hope that isn't to convoluted.

Josh
  • 21
  • 3