def capture(self):
        amount = self.cleaned_data['amount']
        try:
            self.payment.capture(amount.gross)
        except (PaymentError, ValueError) as e:
            self.add_error(None, _('Payment gateway error: %s') % e.message)
            return False
        return True
dataset/ETHPy150Open mirumee/saleor/saleor/dashboard/order/forms.py/CapturePaymentForm.capture/original