This is an integration module with CardSave payment gateway for Commerce.

Sandbox project page: https://drupal.org/sandbox/malovanets/2179745

GIT:

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/malovanets/2179745.git commerce_cardsave_direct
cd commerce_cardsave_direct

My recent manual project reviews:

https://drupal.org/comment/8526657#comment-8526657
https://drupal.org/comment/8526769#comment-8526769
https://drupal.org/comment/8526829#comment-8526829

CommentFileSizeAuthor
#15 coder-results.txt2.11 KBklausi

Comments

malovanets’s picture

Issue summary: View changes
malovanets’s picture

Issue summary: View changes
PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxmalovanets2179745git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

malovanets’s picture

Status: Needs work » Needs review
draenen’s picture

Status: Needs review » Needs work

Overall very clean code and looks to be a well implemented integration module. Below are a few items I found.

commerce_cardsave.admin.inc
Line 129: Imploding a single array item doesn't do anything.
Lines 75, 172: Consider using REQUEST_TIME instead of time(). REQUEST_TIME is set at the beginning of the script and is generally faster than time().

commerce_cardsave.api.inc
Line 48: Making a copy of the global user object is safer so you don't accedentily modify the global. Consider $user = $GLOBALS['user']; instead of global $user;
Line 295: Needs a space before the closing / in <br />

commerce_cardsave.module
Line 184, 214: REQUEST_TIME vs time()
Line 372: use check_plain($api->getMessage())
Line 452: Don't pass variables to t(). Use check_plain() instead.

malovanets’s picture

Status: Needs work » Needs review

Thank you for the feedback. I've made those changes.

hayashi’s picture

Status: Needs review » Needs work

hi @malovanets

commerce_cardsave.module line 144
$form['js']['#markup'] = '<script type="text/javascript">window.document.forms[0].submit();</script>';

If there is other form, there is a possibility to submit them. So you should specify form id to submit.

malovanets’s picture

Status: Needs work » Needs review

hayashi, thank you for the feedback. However, there shouldn't be any other form on that page. It is a simple "bridge" between the site and the payment gateway. The user wouldn't even notice this page if JS is enabled. Otherwise, he will see a "Please click this button to authorise your card" button to submit that single form.

gobinathm’s picture

Status: Needs review » Needs work

PAReview is still reporting issue on the GIT Repo. Please address them to move forward.

malovanets’s picture

Status: Needs work » Needs review

The PAReview is reporting issues like "Line exceeds 80 characters; contains 84 characters" or "Missing comment for @return statement" for methods which are just returning a protected property. I think these are vary minor issues and don't affect the understanding of the code.

gobinathm’s picture

@malvanets, yes you are right. Those are not application blocker, but its good to adhere to basic coding standards.

Project applications with Review bonus takes priority. So please complete manual reviews & include those url's here. Once done, please include appropriate tags in the application.

Note: these are not review comments, they are are simple suggestion on project application.

malovanets’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
malovanets’s picture

Issue summary: View changes
malovanets’s picture

any updates?

klausi’s picture

Assigned: Unassigned » patrickd
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus
StatusFileSize
new2.11 KB

There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732

Review of the 7.x-1.x branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. The project page should mention that this is a payment gateway for Commerce, right? Currently it is just an advertising text from Cardsave and does not help users decide, please follow the tips for a great project page: https://drupal.org/node/997024
  2. commerce_cardsave_3ds_init_form(): no need to call drupal_render() here, just return the form render array, it will rendered later for you.
  3. '#markup' => '<p>Please log into your merhcant account a...: All user facing text must run through t() for translation.

But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to patrickd as he might have time to take a final look at this.

malovanets’s picture

- updated the project description
- fixed all automated code review issues
- added the missing t()

commerce_cardsave_3ds_init_form(): no need to call drupal_render() here, just return the form render array, it will rendered later for you.

Pay attention that I'm not returning but printing the form. I don't need any other markup on that page like header, footer etc.

malovanets’s picture

patrickd’s picture

Assigned: patrickd » Unassigned

Sorry I'm currently not able to do a proper review of this project

klausi’s picture

Assigned: Unassigned » dman

Assigning to dman as he might have time to take a final look at this.

dman’s picture

Status: Reviewed & tested by the community » Fixed

Hey. It's tricky to review full third-party integration things without setting up full accounts, so I'll just give the code a standard look, taking into account the existing RTBC...

* Thanks for the README, it is clear and helps.
* Code is clean, comments are clear and useful. Especially the attention to @params.
* The heavy use of SESSION variables is disturbing, but I won't second-guess that it's needed. The whole package looks complex.
* Generally, supremely readable code!
* I would warn against your getXMLValue() function. XML used to be hard, but doing it with regexp will bite painfully one day. Spend a little time with the PHP XML libraries. Ditto on your generateXML() that builds XML with string replacement. One day someone will have a @password that includes a < or a product name that includes an ' and bad things will inexplicably happen.

I'm unable to test the full end-to-end functionality, or even the UX, but as PHP, code, and Drupal stuff goes, this is looking really good.
I can't visually see any hidden security issues - not without spending a day or more digging into the protocol itself. But the solid coding conventions exhibited here give me confidence it's well-built.

-----------------------

Thanks for your contribution, malovanets!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, 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.

Thanks to the dedicated reviewer(s) as well.

malovanets’s picture

Many thanks to all who reviewed my module and helped to make it better! So an inspiring moment!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.