Integrates PesoPay as a payment gateway for Drupal Commerce.

Features
- Option to switch between live and test environment.
- Support for Offsite Payment
- Support for DataFeed

Requirements
- Drupal 7
- Drupal Commerce.

About Peso Pay
- http://www.pesopay.com/

Link to the project: https://drupal.org/sandbox/anil614sagar/2165627

Git access: http://git.drupal.org/sandbox/anil614sagar/2165627.git

Pareview Review Results : http://pareview.sh/pareview/httpgitdrupalorgsandboxanil614sagar2165627git

Review Bonus Manual Reviews :

https://drupal.org/node/2164007#comment-8317951
https://drupal.org/node/2087205#comment-8317995
https://drupal.org/comment/8318539#comment-8318539
https://drupal.org/comment/8339167#comment-8339167
https://drupal.org/comment/8339245#comment-8339245

Cheers,
Anil Sagar

Comments

anil614sagar’s picture

Title: Commerce PesoPay » [D7] Commerce PesoPay
grabimo’s picture

The README.txt lacks a brief description of the project. Here is the Drupal guideline I found useful: https://drupal.org/node/161085

anil614sagar’s picture

Thank you grabimo ,

Updated README file.

Cheers,
Anil Sagar

anil614sagar’s picture

Issue summary: View changes
anil614sagar’s picture

Issue tags: +PAreview: review bonus
anil614sagar’s picture

Issue summary: View changes
klausi’s picture

Assigned: Unassigned » patrickd
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

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

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    
    FILE: /home/klausi/pareview_temp/README.txt
    --------------------------------------------------------------------------------
    FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
    --------------------------------------------------------------------------------
     39 | ERROR | Files must end in a single new line character
    --------------------------------------------------------------------------------
    
  • Codespell has found some spelling errors in your code.
    ./README.txt:3: Sponsered  ==> Sponsored
    

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 Git commits are not connected to your user account. You need to specify an email address. See http://drupal.org/node/1022156 and http://drupal.org/node/1051722
  2. "$log = 'Commerce pesopay module cannot load the transaction returned by the Pesopay server.' . $transaction_id;": do not concatenate $transaction_id into the translatable string, use placeholders with watchdog() instead.
  3. commerce_pesopay_redirect_form(): do not document $form and $form_state, see https://drupal.org/node/1354#forms
  4. commerce_pesopay_redirect_form(): doc block is wrong, $order is not an array?

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.

anil614sagar’s picture

Hi Klausi,

Thank you for the review and suggestions. Please find updates below.

1. Code Sniffer issue has been fixed. Please find results below.

http://pareview.sh/pareview/httpgitdrupalorgsandboxanil614sagar2165627git

2. Fixed Codespell "Sponsored" error.

3. Fixed the git commits issue. You can find the results here.

https://drupal.org/node/2165627/commits

4. "$log = "" use placeholders issue has been fixed.

5. Removed $form and $form_state from doc blocks.

6. Changed $order to object in doc blocks.

Thank you once again for valuable suggestions.

Cheers,
Anil Sagar

anil614sagar’s picture

patrickd’s picture

Although your menu item is just a callback that will never face a user, I'd recommend you to set a descriptive title anyway. This helps to understand what the route does when a developer dumps the output of hook_menu_alter().

I don't see any advantage of the existence of this constant?
define('COMMERCE_PESOPAY_SECRET_KEY', '');

I'd at least comment this out when it's not used.. but.. that's not important..

 279 function commerce_pesopay_redirect_form_submit($order, $payment_method) {
 280   // Do nothing for now on submit.
 281 }

You have to think about whether this controller might be called with one or all of the POST variables missing..

 287   $src = $_POST['src'];
 288   $prc = $_POST['prc'];
...

Otherwise you'll end up with a lot of nonsense error messages in the logs.
I'd suggest you either prefix each of these $_POST variable accesses with @ so it won't produce error messages but will fail on hash validation anyway:

 287   $src = @$_POST['src'];
 288   $prc = @$_POST['prc'];
...

or you make sure that the variables are set in the first place:

if (!isset($_POST['src'], $_POST['prc'], ....)) {
  // log the invalid access.
  return 'some error message';
}

Though I couldn't find anything critical..

Thanks for your contribution!

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.

patrickd’s picture

Status: Reviewed & tested by the community » Fixed
anil614sagar’s picture

Thank you Patrickd ,

I will do the changes mentioned above before making the project as "Full Project".

Thank you once again for the valuable suggestions.

Cheers,
Anil Sagar

Status: Fixed » Closed (fixed)

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