CVS edit link for mikaelli

I have created a payment module for Ubercart to process payments at the payment processor Payson (http://www.payson.se). Payson is a Swedish payment processor that can accept payments by credit card as well as Swedish Internet banks. Would be happy to contribute this module.

Comments

limikael’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new3.37 KB

Ok, here it is for review

avpaderno’s picture

Status: Needs review » Needs work
Issue tags: +Module review

Hello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.

As per http://drupal.org/cvs-application/requirements, the motivation message should be expanded to contain more details about the features of the proposed module, and it should include also a comparison with the existing solutions.

limikael’s picture

Status: Needs work » Needs review
StatusFileSize
new3.25 KB

Ok the features of the module are quite similar to those of uc_paypal that handles payments for Ubercart using Paypal. The Paypal module has two payment methods though, the "Website Payments Standard" and the "Express Checkout", whereas my module has only one. So my module is similar in features and implementation to the WPS part of the uc_paypal module.

There is no specific module to process Ubercart payments using Payson at the moment, this is a list of projects that are integrated with Payson:

https://www.payson.se/about/commerce/businessinfo/default.aspx

Is that enough info? If not, do you have a template or example that shows how this info should be presented?

A new version is attached that conforms better with the code standard.

limikael’s picture

StatusFileSize
new3.66 KB

Updated version:

- Complete the order on the notification call from payson, rather than waiting for the user being redirected back to the site.
- Send data to payson encoded as ISO-8859-1. Relies on http://drupal.org/node/624086 in order to work.

avpaderno’s picture

Assigned: Unassigned » avpaderno

I will review the code tomorrow morning (about 24 hours from now).

avpaderno’s picture

Status: Needs review » Needs work
  1. The module doesn't contain the uninstallation function that should remove the Drupal variables defined from the module when it is going to be uninstalled.
  2.   $t=
        '<img src="http://www.payson.se/images/logos/payson.gif" />'.
        t('Payson - Betala med kreditkort eller internetbank.');
    

    The string passed to t() must be in American English, which is the default language used from Drupal.

limikael’s picture

I'm sorry I haven't been in here for some time to check on the progress so I just saw the reply. I will fix these issues as soon as possible.

Cousken’s picture

Hello!

I would very much appreciate if this module was completed, i'm writing this in an attempt to motivate limikael :) This module is wanted! Here's cheering for you.

lowfour’s picture

Hej Mikael

I tried your module with payson.se in test mode and it seems everything is working but the ExtraCost variable, that for some reason is noted as missing in the Test page. I would be extremely grateful if you could help me out somehow, as I need a payment module very badly!

What could be wrong? Am I missing some flatrate settings or something?

HUGE thanks for your work!

limikael’s picture

Status: Needs work » Needs review
StatusFileSize
new4.1 KB

Here comes an updated version with these fixes:

- Uninstall functaion that removes variables created by the module.
- All strings in American English.

limikael’s picture

Hi,

I'm not getting this error. I just made a fresh installation of drupal and ubercart with this module and it seemed to work. This is the output from the payson test server (warning for viking language):

Obligatoriska parameterar som måste finnas med och vara korrekta:
MD5- Obligatorisk - OK
Description - Obligatorisk - OK
SellerEmail - Obligatorisk - OK
BuyerEmail - Obligatorisk - OK
AgentId - Obligatorisk - OK
OkUrl - Obligatorisk - OK
GuaranteeOffered - Obligatorisk - OK
Cost - Obligatorisk - OK
ExtraCost - Obligatorisk - OK

So here it looks like the ExtraCost is there. I don't understand how it could magically disappear, it should be sent every time. The value sent as ExtraCost is the shipping actually, so a possible source could be that the module fails to calculate the shipping in your correctly in your case. For me it worked on a fresh install, but maybe you have other ubercart related modules enabled that this module doesn't understand? Which modules do you have enabled so I can test with a similar setup?

limikael’s picture

Thanks for the cheering! :) If you find someone on irc who has privileges to review code and grant CVS rights you can poke them for me, ok? :)

avpaderno’s picture

Status: Needs review » Needs work
  • The points reported in this review are not in order or importance / relevance.
  • Most of the times I report the code that present an issue. In such cases, the same error can be present in other parts of the code; the fact I don't report the same issue more than once doesn't mean the same issue is not present in different places.
  • Not all the reported points are application blockers; some of the points I report are simple suggestions to who applies for a CVS account. For a list of what is considered a blocker for the application approval, see CVS applications review, what to expect. Keep in mind the list is still under construction, and can be changed to adapt it to what has been found out during code review, or to make the list clearer to who applies for a CVS account.
  1.   global $conf;
      $conf['i18n_variables'][] = 'uc_payson_checkout_button';
    
    

    The global variable `$conf` is accessed through variable_get(), variable_set(), and variable_del().

  2.   // Remove all our variables.
      db_query("DELETE FROM {variable} WHERE name LIKE 'uc_payson_%%'");
    }
    

    The code could delete Drupal variables defined from the module uc_payson_extension.module. Drupal variables should removed using variable_del(), passing to the function the name of each variables.

  3. See http://drupal.org/coding-standards to understand how a module should be written. In particular, see how the code should be formatted.
avpaderno’s picture

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

I am closing this issue due to lack of replies.

avpaderno’s picture

Component: Miscellaneous » new project application
Assigned: avpaderno » Unassigned
Issue summary: View changes

Please read the following links as this is very important information about CVS applications.

Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for these applications. Please read Migrating from CVS Applications to (Git) Full Project Applications and Applying for permission to opt into security advisory coverage on how this affects and benefits you and the application process. In short, every user has now the permissions necessary to create new projects, but they need to apply for opt into security advisory coverage. Without applying, the projects will have a warning on projects that says:

This project is not covered by Drupal’s security advisory policy.