1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Braintree\Gateway\Response;
use Magento\Sales\Model\Order\Payment;
class VoidHandler extends TransactionIdHandler
{
/**
* @param Payment $orderPayment
* @param \Braintree\Transaction $transaction
* @return void
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function setTransactionId(Payment $orderPayment, \Braintree\Transaction $transaction)
{
return;
}
/**
* Whether transaction should be closed
*
* @return bool
*/
protected function shouldCloseTransaction()
{
return true;
}
/**
* Whether parent transaction should be closed
*
* @param Payment $orderPayment
* @return bool
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function shouldCloseParentTransaction(Payment $orderPayment)
{
return true;
}
}