Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setTransaction example
protected
Source
$source
;
protected
OrderTransactionCaptureRefundEntity
$refund
;
public
function
__construct
(
OrderTransactionCaptureRefundEntity
$refund
,
protected
OrderEntity
$order
)
{
if
(
$refund
->
getTransactionCapture
(
)
&&
$refund
->
getTransactionCapture
(
)
->
getTransaction
(
)
)
{
$transaction
=
$this
->
removeApp
(
$refund
->
getTransactionCapture
(
)
->
getTransaction
(
)
)
;
$refund
->
getTransactionCapture
(
)
->
setTransaction
(
$transaction
)
;
}
$this
->refund =
$refund
;
}
public
function
getOrderTransaction
(
)
: OrderTransactionEntity
{
if
(
$this
->refund->
getTransactionCapture
(
)
&&
$this
->refund->
getTransactionCapture
(
)
->
getTransaction
(
)
)
{
return
$this
->refund->
getTransactionCapture
(
)
->
getTransaction
(
)
;
}