Allow other modules to change payment amounts

singularo - May 28, 2008 - 05:09
Project:Signup Pay for a node
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

We need this for early bird discounts.

AttachmentSize
signup_pay5.diff1.84 KB

#1

kbahey - June 1, 2008 - 05:54
Status:active» postponed (maintainer needs more info)

What happens if more than one module try to change the amount? Which one "sticks"?

Also, does this code:

if ($adjusted_amount) {

Work with an array?

Shouldn't this be something like:

if (count($adjusted_amount) > 0) {

#2

singularo - June 1, 2008 - 08:05

I've changed the patch slightly, as we have more than one module changing the code, exactly as you say. Basically it uses a copy of the code from module_invoke instead using module_invoke to do cumulative adjustments. Only a couple of lines extra. Revised patch attached.

AttachmentSize
signup_pay_263575.diff 1.91 KB

#3

kbahey - June 1, 2008 - 15:28
Status:postponed (maintainer needs more info)» fixed

Modified it a bit to make it one place to call from.

Committed.

Thank you.

#4

singularo - June 2, 2008 - 02:07

Cool, yeah, thats nicer.

#5

Anonymous (not verified) - June 16, 2008 - 02:11
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.