Hi there,

as this is my very first Drupal module, I would like to ask you to be patient with me. I am also quite new to Git, but I would really like to contribute to Drupal so I am more than happy to learn.

This module provides payment gateway for the CardPay, which is an online payment service of a Slovak bank Tatrabanka, a. s. As far as I know there is no module for this so far.
Link to my project page is: http://drupal.org/sandbox/petiar/1251954
This should be the link to my Git repository: petiar@git.drupal.org:sandbox/petiar/1251954.git
This is module for Drupal 6.x

One question - this module is for Ubercart, so its "machine" name should be "uc_cardpay". How do I achieve that?

Thanks a lot.

Comments

tr’s picture

Status: Needs review » Needs work

Please read and follow http://drupal.org/coding-standards.

Specifically, remove the tabs, remove whitespace at the end of lines, whitespace on blank lines, and whitespace and at the end of your .module file. You can install the Coder module and it will help you find some of these problems, but the Coder module doesn't find everything.

Remove the $Id$ and the version = "6.x-1.0" from your .info file. Remove the $Id$ from your .install file.

Your module requires mcrypt, which is not installed with PHP by default, so you must check on the presence of mcrypt in hook_requirements(). Also, please include instructions in a README.txt for installing mcrypt and any other non-standard extensions that you need.

"Implementation of" should be "Implements" in all your hook comments.

I haven't looked at the code for security problems - I'll do that after it gets cleaned up.

petiar’s picture

Status: Needs work » Needs review

Hi TR,

thanks for the review and apology for all the mess. I went through you reply, as well as the coding standards and I have also checked my module with the Coder. I hope now it is alright.

Thanks for your time.
Petiar

petiar’s picture

Hi everybody,

is this issue not getting updated because those who may review it are busy or is any action required on my side? No rush, just wanted to make sure.

Thanks,
Petiar.

greggles’s picture

In uc_cardpay_uninstall -
1. Ideally you should use variable_del on specific variable names to prevent accidentally deleting something.
2. If you don't use variable_del then you will need to clear the cache because your delete statement isn't doing that.

It would be relatively easy for a user to spoof this:
$_SESSION['pay_method'] = $_POST['pay_method'];

Is the pay_method not available in $arg1 or $op or something?

Instead of using ! and check_plain you can simply use the @ placeholder in this code:

'... !reference.', array('!reference' => check_plain($VS))

The ideal way to do this allows translators to change what text is linked:

      $output = t('Payment failed') . '<br /><a href="' . $s_front . '">' . t('Click to return to the front page.') . '</a>';

should be:

      $output = t('Payment failed <br /><a href="!front_url">Click to return to the front page.</a>', array('!front_url' => url());

In uc_cardpay_complete, it seems like you are only checking the checksum if it's an "OK" value. Is it possible in the API to confirm the checksum for all result codes? If so I suggest doing that to ensure the module can rely on the incoming data before doing anything else with it.

Regarding making the machine name uc_cardpay, you will need to push to a new directory in git with the name uc_cardpay. The current one is just cardpay which is an issue.

Regarding why this process takes so long...there are many reasons. One of the reasons your application is harder to review is that it's about Ubercart so only people who are familiar with Ubercart are able to give a review.

Also, I noticed several relatively small coding standards issues. I suggest using the coder module on "minor."

greggles’s picture

Status: Needs review » Needs work
Issue tags: +PAReview: Ubercart

tagging and setting status appropriately.

Also, thanks for your work to contribute a module - this seems like it will be a great addition!

misc’s picture

Status: Needs work » Closed (won't fix)

The application has been marked for need work in 15 weeks, and there is no email address available for the applicant. Marks this as closed (won't fix). @petiar, if this is wrong, please feel free to reopen this application.