Closed (fixed)
Project:
Drupal.org CVS applications
Component:
new project application
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
18 Jan 2011 at 22:50 UTC
Updated:
18 Oct 2018 at 20:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
avpadernoHello, and thank you for applying for a CVS account.
Please carefully read what reported in http://drupal.org/cvs-application/requirements about what you need to do when you need a CVS account to be a co-maintainer.
I apologize if this is not a co-maintainer application, but as you reported you want to add two module to the e-commerce project, I would guess you want to be a co-maintainer.
Comment #2
Bojhan commentedActually, from talking to him it seems he wants to submit new projects. Obviously for this, we need an actual project zip to review - I am putting this back to needs work.
Comment #5
avpadernoComment #6
ikos commentedHi,
Here's the first of the modules I was talking about submitting. It's still in progress as the API of Drupal Commerce is not yet 100% complete and so the final piece of code cannot be added (see Readme).
Many thanks
Richard
Comment #7
ikos commentedRevised this so it passes Coder module check.
Comment #8
avpadernoAs per requirements, the motivation should include more than two sentences that describe the module features, and compare the proposed module with the existing solutions.
Comment #9
ikos commentedHi,
This module is a payment gateway module that will enable the Drupal Commerce module to connect to the SagePay Payment Gateway (UK based payment provider) in order to process credit card payments using a redirect method. SagePay is a very popular payment gateway in the UK and so this module is essential for adoption of Drupal 7 based e-Commerce.
There is no other implementation of this payment gateway for Drupal Commerce (as Drupal Commerce is still in development, there are only a couple of example gateways at the moment).
Comment #10
recidive commented@kiamlaluno: @ikos was here in Paris for Drupal Commerce code sprint. He's doing a good job with UK payment gateways. It's not for e-commerce module. But for Drupal Commerce module. And he need to contribute his module as a contrib.
I think it's fair giving him access for checking in his code to drupal CVS.
Thanks!
Comment #11
avpaderno@recidive: That's fine, but a CVS application is approved after the code is reviewed, and the code doesn't contain any of the issues listed in http://drupal.org/node/539608.
Comment #12
rfaySo the first thing is to make sure we've met the requirements of https://drupal.org/node/539608.
Very cool - subscribing and marking for review. Thanks for wanting to contribute to the community! These are some annoying hoops to jump through but you'll get through them!
Comment #13
avpadernoComment #14
recidive commentedI did a quick code inspection and here's what I've found:
First of all you module namespace can be only "commerce_sagepay", there's no need for it to be "commerce_payment_sagepay".
Module PHP files should start with:
It's missing the "// $Id$" part.
Code comments should end with a full stop.
In Drupal 7 hook declaration documentation should be in the form:
This should be
Look I removed the extra '*' from the end of the code comment
Code comments should start with capital letter and, again, it should end with a full stop.
We probably don't need it here.
Here you probably want to make this an array like this to make the code more reable:
Then you can:
Or if you want this URL encoded, you can use this drupal function to do that for you:
Whenever possible, make use of single quotes as it's faster and easy to read.
Also there are some code commented out. You should remove all of them.
Please make sure code indentation is correctly, e.g. _commerce_sagepay_get_tokens() indentation is completely out of the whack.
In the .info file you don't need that part as it is added by drupal.org packing script:
Comment #15
ikos commentedHi,
Thanks for the review @recidive.
I've been through and made most of your recommended changes. The only one I skipped over was the query_string implode as it didn't actually do what it needed to do. However I still replaced the rest of that function as your idea made it more legible.
Latest version is attached.
Comment #16
rfayNit: Please indent the members of the array by 2 spaces.
All of the concatenated watchdogs are done wrong - watchdog() is a strange beast that takes arguments in the same way t() does so that the messages are translatable.
All of these raise questions.
1. Nit: Please indent members of the array.
2. This function operates on unsanitized data. Does it know that? Could evil data presented to this callback (which is unprotected by permissions) do evil things? Should the tokenized values be sanitized? I suspect this needs review.
3. I think you might be able to make a cleaner function with strtok() or *something*. It looks like a lot of work. I'm certainly not insisting, just suggesting another possible approach.
This switch statement doesn't have a default case and it certainly needs one.
Finally, I *really* encourage you to document the response format you're working with in commerce_sagepay_callback(). You'll be happy for this a thousand times over, because every time you work on the code you'll be able to look at the function and know what it is you're trying to parse. Pointers to additional information about this entire exchange would be useful as well.
Thanks again for being willing to contribute to this and your patience in jumping through these hoops. Many of the things I've mentioned are for the long-term health of the project, so don't actually have to be addressed here, but you might consider doing it anyway.
Comment #17
ikos commentedHi Randy,
Thanks again for spending the time to review the code. I've been at this for 20 years and have never had such thorough peer review (and it's great!!)
I have uploaded a new version with your comments incorporated. However, now I've got this far, I'd appreciate some thoughts / input from yourself, @recidive and Ryan as to how we handle attaching the payment back to the order for a redirect payment method like this. I've left marker @todo's in lines 207, 264 and 291.
kind regards
Richard
Comment #18
ikos commented*Sigh* Forgot to attach :)
Comment #19
rfayNote that not all problems need to be fixed up to get CVS, and further review and enhancement will be done before you get this in.
Comment #20
rfayI think you'll be a great committer and consider this application RTBC. Thanks so much for being willing to contribute to the community.
While you're celebrating, please check all your watchdogs, as there's still at least one broken one (I think you just have a '.' instead of a ',':
Comment #21
avpadernoThank you for your contribution!
I am going to update your account so you can opt into security advisory coverage now.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #23
avpaderno