CVS edit link for evan23

My company required an Ubercart payment processor module for an online gateway (https://www.payway.com.au/), and no module previously existed, so we went ahead and wrote the code and wish to submit it back to the Drupal community.
CommentFileSizeAuthor
#2 uc_payway.zip2.31 KBevanbarter
#1 uc_payway.zip2.28 KBevanbarter
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

evanbarter’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
2.28 KB

Admittedly, some the code needs a bit of a style cleanup as it's based off some reference code which differs from the Drupal style guidelines.

There is also a dependency on a copyrighted API, which I assume I cannot include on Drupal.org, so the module should eventually include a README describing how to acquire this dependency.

evanbarter’s picture

FileSize
2.31 KB

Whoops, disregard archive in #1, missed a semicolon.

apaderno’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.

evanbarter’s picture

Status: Needs work » Needs review

Forgive me, but I don't know what else to include in my motivation message given the simplicity of the module. Here it is padded out a bit:

This module implements the Ubercart hook hook_payment_gateway to allow a website that accepts credit cards with Ubercart to charge the card via the Westpac PayWay (https://www.payway.com.au/) API. It also provides a form for configuring the settings used to make the connection to the gateway.

There is currently no existing module which provides this functionality with this payment gateway, however the following modules provide comparable functionality with different (Australian) gateways:

apaderno’s picture

Assigned: Unassigned » apaderno

I will review the code within 6 days from July 4.

spudette77’s picture

subscribing... any update on how this module is going... I could really use it for my e-commerce store as we also use Westpac.

apaderno’s picture

Status: Needs review » Needs work
  1. The module doesn't implement hook_uninstall() to remove the Drupal variables defined from the module.
  2. The code uses strlen() and substr() for strings that could contain Unicode strings (especially if they are gotten from a HTML form).
  3. There is commented code that makes me think the code is not complete. You should submit complete code to review it.
  4.   require_once drupal_get_path('module', 'uc_payway') .'/api/Qvalent_PayWayAPI.php';
    

    There is a Drupal function that is used to load PHP code from a file.

apaderno’s picture

Status: Needs work » Closed (won't fix)
Nigel Cunningham’s picture

Component: Miscellaneous » miscellaneous
Status: Closed (won't fix) » Active

Reopening as I've been preparing to use this module and would like to see it become a 'proper' Drupal module. I can give some feedback regarding comment 7 and am willing to maintain a Drupal.org version if evan23 is not around/willing to do so:

1. hook_uninstall: Will fix.
2. strlen/substr: Could I get a pointer as to the correct processing to use? I've seen drupal_strlen, but am not sure what to use in place of substr. Is it possible to instead check they're not unicode or convert them from unicode (a credit card name and expiry are all that's involved).
3. The api file is provided by Westpac when they have checked the security of your site. It should not be provided as part of the module, though instructions for installing the file should be in a Readme.

Regards,

Nigel

Nigel Cunningham’s picture

Title: evan23 [evan23] » Westpac Payway Drupal Integration Module
DrunkMunki’s picture

I would appreciate an active maintainer as I also would like a few fixes done, but this coding is way above my level.
I have posted the module also on http://www.ubercart.org/project/uc_payway because i couldnt find this thread when i downloaded it a while ago.

Few edits;
uc_payway_cert_file_path, uc_payway_ca_file_path,uc_payway_log_dir had to have absolute locations, couldnt find any code to replace location so instead of /sites/[all/default]/modules i had to use /home/username/public_html/sites/...

  $orderAmountCents = number_format((float)$amount * 100, 0, '.', '');
  $orderAmountDollars = number_format((float)$amount;

added the second line and referenced it in:

  // Successful requests will have a summary code = 0
  if ($summaryCode == 0) {
    $message = t('Credit card charged: !amount', array('!amount' => uc_currency_format($orderAmountDollars)))
              .'<br />'. t('PayWay receipt no.: @receipt', array('@receipt' => $receiptNo));

as the admin messages were displaying all cent values submitted as dollar values.

changed:

$description = $responseParameters['response.Text'];

to

$description = $responseParameters['response.text'];

as it wasnt showing up in the admin messages

Current Issue
when a user clicks "back" on the review order page and updates details and resubmits it, it then generates a "Duplicate Transaction" error and wont go past the "review page", would love some help in addressing this issue.

apaderno’s picture

Assigned: apaderno » Unassigned
Status: Active » Closed (won't fix)

Applying for full git access is different from applying for a CVS account, which is not supported anymore. See http://drupal.org/project/projectapplications.

sabweb’s picture

Hi there, what is the status quo with this solution please?

xurizaemon’s picture

There's https://github.com/GiantRobot/uc_payway_net now for D7. I should post it as a project proper, had forgotten it existed until afestein reminded me just now!

apaderno’s picture

Issue summary: View changes

Setting the comments to read-only.

apaderno’s picture

Component: miscellaneous » new project application
apaderno’s picture

Title: Westpac Payway Drupal Integration Module » evan23 [evan23]
apaderno’s picture

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