Hi Kees and others,

I've altered your module a little bit. I'm posting it here as a zip, maybe you'd like to take a look at it.

The things I've altered;
- added uninstall instructions in .install so the module database table and variables will be dropped and deleted
- added and corrected fields for settings in Ogone Payment settings
- created a template variable in which a user can paste code for the template (wanted to add a upload field but couldn't get it working)
- altered $url_base so that if one has an i18n_get_lang var in the url it will be submitted to Ogone, yourdomain.com becomes yourdomain.com/en if applicable. Otherwhise Ogone can't find the template at $url_base.'/ogone_template_call'.
- altered the hidden input fields submitted to Ogone (was sending wrong values for TXTCOLOR, TBLBGCOLOR) and added the new variables
- altered the function uc_ogone_template() to create a page out of the settings variables
- // Todo: handle -> fixed = current(parse_url($_SERVER['HTTP_REFERER']))

Hope you can use some of the changes I've made!

Cheers,
Bartezz

CommentFileSizeAuthor
uc_ogone.diff41.83 KBbartezz

Comments

keesje’s picture

Hi Bart,

Thanks for your work.

This is the most rigorous patch I've ever seen ;-). It replaces 100% of the module code.

I can use it for the .install file, not for the module itself.

Please provide a patch with only the changed and added code parts so I can merge with other changes and check changes before adding them.

I'm not sure the template variable is such a good idea. It opens up many pitfalls,
1)safe and unsafe items in one page, (IE spits out a horrifying warning screen to your buyer in such case...)
2) (css)images not loaded if not linked to absolutely. It also must be very securely filtered.
If this is implemented it has to be a very well documented and heavily filtered "experts only" setting.

Kees

bartezz’s picture

Hi Kees,

No problem, finally paying it forward here in the Drupal community.

It's my first patch (done with Tortoise SVN) and kinda new to it so will look how to make a diff file for ya :)

I came up with the idea for a template variable because in your original module the template was hardcoded. I've noticed the safe/unsafe warning and was wondering what workaround I could come up with besides running a copy of your whole site under https. Any ideas? How about an input field in which one can place the url to the template on a secure part of their server. One only has to make sure the template.html, css and images are placed in the https directory of their server. Would be nice if one could insert the url for a template.html of each enabled language.

Links must be absolute idd, but that's more a documentation thing than some hard-to-learn kinda thing?!

I agree on the filtering and really haven't thought about that part much. Read your mail on XSS filtering. Can you explain a bit what the pitffalls can be without filtering and such?

Regards,
Bartezz

keesje’s picture

Status: Active » Closed (fixed)

Used some of your changes in current versions, thanks.