Git clone: git clone commerce_gpg
Drupalcode tree:
Version: 7.x

Commerce GPG provides a credit card payment method for Drupal Commerce that encrypts credit card information using the PHP: GnuPG extension. A common use case would be for shops that would prefer to use an existing terminal for manual card processing or have an accounting system that handles processing. The GPG encrypted block is available in a commerce-order token for embedding in emails generated by the order action. The block is typically decrypted by an email client plugin.

This module was not created to be a method of secure credit card storage for later online use. It purposely provides no method of decryption and is strictly designed for secure transmission of the credit card data only.


ykyuen’s picture

Automatic Review: (
1. There is some issue need to be fixed.
2. You should create another branch called 7.x-1.x and set it to default. See

Manuel Review:
1. Try to add more @param and @return directives in the comments of each function.

alexmoreno’s picture

Firstly thank you very much for your effort.

Just a quickly thing, the url in the description is not right. Please, take note of the correct one:

git clone commerce_gpg

The module itself has been written quite nicely, the code is easily readable, but it could be improved a bit following the Drupal coding standars . Please, read "Doxygen and comment formatting conventions":

The current git branch also must be changed, from master to Drupal 7.

You should also get a review bonus to see your project reviewed fastly:

And a final issues throwed by the paraview tool (sorry for that):

FILE: /var/www/drupal-7-pareview/pareview_temp/README.txt
57 | ERROR | Files must end in a single new line character

FILE: /var/www/drupal-7-pareview/pareview_temp/
11 | ERROR | It's only necessary to declare files[] if they declare a class or
| | interface.
12 | ERROR | Files must end in a single new line character

FILE: /var/www/drupal-7-pareview/pareview_temp/commerce_gpg.install
9 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar()."
30 | ERROR | Files must end in a single new line character

FILE: /var/www/drupal-7-pareview/pareview_temp/commerce_gpg.module
156 | ERROR | Missing parameter type at position 1
158 | ERROR | Missing parameter type at position 2
160 | ERROR | Missing parameter type at position 3
162 | ERROR | Missing parameter type at position 4

Thank you.

ain’s picture

Status: Needs review » Needs work

Automated review

As stated above, there are a few errors in your module, please see

Manual review

  1. First of all, please remove master branch from your Git repository. It should only have version-specific branches, e.g. 7.x-1.x (in your case) or 6.x-1.x for Drupal 6, see Moving from a master to a major version branch for more info.


  1. Consider adding a block to README on PHP GnuPG extension installation instructions, e.g. links to resources.

NB! To everyone who has commented above: if you find errors in the applications, please also make sure to set the project status to needs work!

cameronbprince’s picture

Status: Needs work » Needs review

All issues identified by the automated review have been addressed. The README.txt file and the project page have been expanded to include reference links for the installation of the required PHP GnuPG extension. Additional comments have been added to the module as well. Finally, a 7.x-1.x branch was created and the original master was removed.

bekirdag’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +PAReview: Commerce

I have checked the code, seems fine, didn't see any problems. I think this one is ready to go.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

Sorry for the delay, but you have not listed any reviews of other project applications in your issue summary as strongly recommended in the application documentation.

manual review:

  1. commerce_gpg_settings_validate(): instead of repeating the is_readbale() condition all the time you could just use a foreach lopp with an array of all the files to check.
  2. commerce_gpg_encrypt(): do not use die(), use watchdog() to log the error instead.
  3. commerce_gpg_encrypt(): that function could return FALSE in case the encryption failed and then you could write an appropriate failed commerce transaction in the caller.

But that are not application blockers, so ...

Thanks for your contribution, cameronbprince!

I updated your account to let you 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 get 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.

Status: Fixed » Closed (fixed)

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

cameronbprince’s picture

Thank you and sorry for the delayed reply. I had an issue with the email account my d.o account was associated with. I will promote the project and make your recommended improvements. Thank you again.

TruthJustice’s picture

Assigned: Unassigned » TruthJustice
Category: task » support
Priority: Normal » Major
Status: Closed (fixed) » Active

Hi,I'm using the Commerce GPG with commerce-kickstart drupal 7.
The problem is that the buyer's details are being sent to my mail except for the credit card number. And nothing is encrypted in it.
I've created couple of keys. One is public and the second is private. I've uploaded to the server the public key.
The question is: Why don't I get the credit number to the mail? and nothing is encrypted?

For your rapid answer,

klausi’s picture

Assigned: TruthJustice » Unassigned
Category: support » task
Priority: Major » Normal
Status: Active » Closed (fixed)

This project application is closed. Please report any problems to the module's issue queue, not here.

klausi’s picture

Issue summary: View changes

Added information related to saving card data for reuse.