Needs work
Project:
DIBS Payment Gateway API
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
10 May 2011 at 14:01 UTC
Updated:
8 Jan 2013 at 17:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
beltofteComment #2
gnucifer commentedI needed to get the module up to date for a project, so implemented hmac support and fixed some other stuff. The module was apparently using an old endpoint url for "Payment Window"-method. Patch is perhaps not ready to be committed without some proper review and cleanup. I also made som minor changes to API, and some code refactoring. I will need better support for dibs status codes etc, so will probably make som more changes and upload a new patch later on.
Comment #3
googletorp commentedIt looks like you are doing a minor refactor in addition to adding hmac support. Try to limit the patch to actually only add the hmac support and if there are places where you think the code could or should be improved, add a seperate case and patch for that, so we don't have to make and all or nothing call.
For the hmac support needs to be added as an optional feature so users can use either hmac or the older md5 keys to not breakte existing solutions. For what I can tell this in a quick review, this replaces the md5 option entirely.
Comment #4
gnucifer commentedMy patch does not remove md5-support, though I accidently removed the admin form validation for the md5-settings. I have fixed this in my local version and will upload a new path. The refactoring was mostly necessary in order to implement the hmac-support. And the the API-breakage can be reversed by uncommenting the code on line 245 in dibs.frontend.inc. The reason I removed the hook_dibsapi_form_alter is partly because one could use the general hook_form_alter to achieve the same result, but mostly because any changes to the form data will break the hmac/md5 validation. I will just fix some mistakes I made in the original patch, so ignore the first patch for now.
Comment #5
gnucifer commentedUploading a new patch even though it is not 100%. Have tested and verified most of the functionallity. Feel free to review the changes, though I will probably work on this some more.
Comment #6
gnucifer commentedRemoved some irrelevant comments.
Comment #7
gnucifer commentedSorry about the large patch, but right now I don't have the time to split this into smaller issues and thought it better contributing all my changes than not sharing them at all.
Comment #8
beltofteReleasing 7.x-1.0 today, and creating a new branch for the development of 7.x-2.x, where the new Payment Window will replace PayWin. Some of the changes from the big patch can also be implemented in this new dev version.
Comment #9
beltofteComment #10
gnucifer commentedI have fixed some more bugs in the patch in #6 since last time. But I can only access the code at work. On monday I can try to upload a new patch against latest dev with these changes if I can allocate anough time.
Comment #11
gnucifer commentedOne thing that would be good to put in the roadmap for the 3.x-branch is to convert transactions into entities. This would greatly simplify tighter integration with for example rules and views. If you want you could delegate that task to me and I could try to work on an patch for this later.
Comment #12
gnucifer commentedSorry about the delay, here comes the latest revision of the "monster"-patch against 7.x-2.x-dev:
Some of the changes are:
+ Probably lots of more minor changes that I can't think of right now.
Some more problems that needs to be addressed:
And most important of all:
This patch also contains a quick-fix for a problem I encountered just a few days ago. Perhaps I should have reverted this change, but was to lazy to do so. Plus it might be a critical bug. To not clutter this thread even further I will create a separate issue for this and link to in this comment in the next hour or so.
EDIT: link to new issue: http://drupal.org/node/1866686
Comment #13
gnucifer commentedI created a github-repo where I will maintain a branch with all of these changes. Next I will try to implement transactions as entities: https://github.com/david-xelera/dibs
Comment #14
gnucifer commentedA warning: Right now there is a major issue with this branch (in http://drupal.org/node/1866688). Don't use in production until this is fixed!
Comment #15
gnucifer commentedThe issue is now addressed. The fix required a database scheme change, but there is currently no upgrade path in my development version! So if you are using my 2.x-branch (https://github.com/david-xelera/dibs) (which you shouldn't unless you really know what you're doing) for now the only solution is to re-install or alter the database manually.