New command: 'cash' to fake a checkout without any user paying for it.

This commit is contained in:
Juerd Waalboer 2013-02-28 13:56:59 +01:00
parent c756ebe08b
commit 05544439b9

View file

@ -1,6 +1,17 @@
#!perl
sub command { NEXT }
HELP "cash" => "Checkout without a user account";
sub command {
my ($self, $cart, $command) = @_;
return NEXT if $command ne 'cash';
call_hooks("checkout", $cart, 'cash', 0); # Fake checkout
$cart->empty;
return ACCEPT;
}
sub hook_checkout {
my ($class, $cart, $user, $transaction_id) = @_;