Describe your bug or feature request.

The PaymentAccessControlHandler only allows test transactions to be deleted. It would be nice to be able to delete manual payments, but they don't utilize a transaction mode. So instead of:

    if ($operation == 'delete') {
      // @todo Add a payment gateway method for this check,
      // to allow a differently named test mode.
      $access = $access->andIf(AccessResult::allowedIf($entity->getPaymentGatewayMode() == 'test'));
    }

We could just check $entity->getPaymentGatewayMode() != 'live'

steps to reproduce it from a clean install.

Create a manual payment and try to delete it.

CommentFileSizeAuthor
2972095-9.patch841 bytestonytheferg

Comments

tonytheferg created an issue. See original summary.

jsacksick’s picture

Status: Needs review » Fixed

lgtm, committed thanks!

Status: Fixed » Closed (fixed)

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