Don't refund transactionItems unless the transaction is successful, or if the item is already canceled. Also, no not call onCancelRecurring for normal Sku's unless they're really recurring. Fixes bug #12089.
This commit is contained in:
parent
8f687d8aa5
commit
8525e4b7ee
7 changed files with 173 additions and 5 deletions
|
|
@ -1020,8 +1020,8 @@ Refunds a specific item from a transaction and then issues shop credit.
|
|||
sub www_refundItem {
|
||||
my ($class, $session) = @_;
|
||||
return $session->privilege->insufficient unless (WebGUI::Shop::Admin->new($session)->canManage);
|
||||
my $self = $class->new($session, $session->form->get("transactionId"));
|
||||
my $form = $session->form;
|
||||
my $self = $class->new($session, $form->get("transactionId"));
|
||||
my $item = eval { $self->getItem($form->get("itemId")) };
|
||||
if (WebGUI::Error->caught()) {
|
||||
$session->errorHandler->error("Can't get item ".$form->get("itemId"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue