diff --git a/plugins/deposit b/plugins/deposit index 993ee0d..2682fa8 100755 --- a/plugins/deposit +++ b/plugins/deposit @@ -26,9 +26,9 @@ sub amount :Tab(13.37,42) { $self->{amount} = parse_amount($amount) or return REJECT, "Invalid amount"; - call_hooks("deposit_methods", $self->{deposit_methods} = {}); + call_hooks("deposit_methods", \my $message, $self->{deposit_methods} = {}); - return "How are we receiving this EUR $amount?", \&how + return $message . "How are we receiving this EUR $amount?", \&how if keys %{ $self->{deposit_methods} }; $cart->add(undef, +$self->{amount}, "Deposit", { is_deposit => 1 }); diff --git a/plugins/deposit_methods b/plugins/deposit_methods index 4eee95e..0ba2b45 100755 --- a/plugins/deposit_methods +++ b/plugins/deposit_methods @@ -3,9 +3,9 @@ sub command { NEXT } sub hook_deposit_methods { - my ($class, $hash) = @_; + my ($class, $message, $hash) = @_; - print <<"END"; + $$message = <<"END"; Please type one of the following: