Commerce Klarna Checkout provides a payment method for Drupal Commerce using Klarna Checkout. This method is different than Commerce Klarna, in the way that it uses a totally different payment integration and offers credit cards, invoice and bank transfer as payment methods.

http://drupal.org/sandbox/MaxOne/1943442

git clone http://git.drupal.org/sandbox/MaxOne/1943442.git commerce_klarna_checkout

Using Drupal 7

A review of an earlier project i made: http://drupal.org/node/1178092

Testing credentials:

Comments

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://ventral.org/pareview/httpgitdrupalorgsandboxMaxOne1943442git

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and put yourself on the PAReview: review bonus high priority list. Then I'll take a look at your project right away :-)

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

MaxOne’s picture

Status: Needs work » Needs review

Corrected the issues from the automated review

likebtn’s picture

1. Please provide more details on the project page (see http://drupal.org/node/997024). You can copy details from your README.txt file.
2. Provide correct Git clone instruction in the Issue:
git clone http://git.drupal.org/sandbox/MaxOne/1943442.git commerce_klarna_checkout
3. Consider justifying tabs and indent in order to keep code well formatted. For example, in commerce_klarna_checkout.module on line 13:

  $items['commerce_klarna_checkout/payment/%commerce_order/%'] = array(
    'page callback' => 'commerce_klarna_checkout_process_payment',
    'access callback' => TRUE,
    'page arguments' => array(2, 3),
    'type' => MENU_CALLBACK,
  );

replace with

  $items['commerce_klarna_checkout/payment/%commerce_order/%'] = array(
    'page callback'   => 'commerce_klarna_checkout_process_payment',
    'access callback' => TRUE,
    'page arguments'  => array(2, 3),
    'type'            => MENU_CALLBACK,
  );

3. commerce_klarna_checkout.install:
- line 35: remove $t(), leave just:

$download_url = l('https://docs.klarna.com/en/downloads/php', 'https://docs.klarna.com/en/downloads/php');
likebtn’s picture

Issue summary: View changes

added testing credentials

MaxOne’s picture

Hi likebtn,

Thank you for reviewing this.

1. I updated the project page with the text from the readme file.
2. Fixed.
3. All arrays are now justified.
4. PAReview warned about not translating text in the $text parameter, but since it is a URL i agree with you. This is corrected.

MaxOne’s picture

Priority: Normal » Major

Changing priority to major as it has been awaiting review more for than two weeks.

MaxOne’s picture

Priority: Major » Critical
kscheirer’s picture

Priority: Critical » Normal
kscheirer’s picture

Title: Commerce Klarna Checkout » [D7] Commerce Klarna Checkout
Status: Needs review » Needs work

I'm not sure why there's a sleep() in commerce_klarna_checkout_redirect_form_validate(). In commerce_klarna_checkout_process_payment() you should sanitize/validate any values from the _GET string.

I'm not sure why Mobile-Detect would be required - you seem to be using it just to determine layouts and gui information. Perhaps this should be an optional component instead? If not present you could let the admin choose a default 'desktop' or 'mobile'.

Otherwise looks good, setting to needs work for the security problem.

----
Top Shelf Modules - Enterprise modules from the community for the community.

MaxOne’s picture

Status: Needs work » Needs review

Thanks kscheirer.

The $_GET string is now sanitized.

When the order is accepted by Klarna, a request is made to the URL specified in commerce_klarna_checkout_menu(). The reason for the sleep() is to wait for this request. Usually this request is made before the user is redirected to the accept page, but not always.

Mobile Detect is no longer required. If not installed, the admin can choose layout in settings.

Best,
Max

MaxOne’s picture

Priority: Normal » Major
kscheirer’s picture

Priority: Major » Normal
Status: Needs review » Reviewed & tested by the community

Thanks for the updates, looks good. There are a few minor issues still reported at http://ventral.org/pareview/httpgitdrupalorgsandboxmaxone1943442git.

----
Top Shelf Modules - Enterprise modules from the community for the community.

MaxOne’s picture

Thanks again kscheirer. It's corrected with one remaining issue which is addressed here https://drupal.org/node/1947286#comment-7213862

Regards,
Max

MaxOne’s picture

Priority: Normal » Major
kscheirer’s picture

Priority: Major » Normal
Status: Reviewed & tested by the community » Fixed

Code still looks good. Consider integrating with the Payment module - it will make your payment processor compatible with Commerce, Ubercart, and Webform all in one go.

Thanks for your contribution, MaxOne!

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.

----
Top Shelf Modules - Crafted, Curated, Contributed.

MaxOne’s picture

Thank you for your effort kscheirer.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Updated git clone instructions according to http://drupal.org/node/1947286#comment-7213300