Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
AppPaymentMethodEntity example
static
::
assertFalse
(
$methods
[
0
]
->
isSynchronous
(
)
)
;
static
::
assertFalse
(
$methods
[
0
]
->
isAsynchronous
(
)
)
;
static
::
assertFalse
(
$methods
[
0
]
->
isRefundable
(
)
)
;
static
::
assertFalse
(
$methods
[
0
]
->
isPrepared
(
)
)
;
static
::
assertFalse
(
$methods
[
0
]
->
isRecurring
(
)
)
;
}
public
function
testAppPaymentMethod
(
)
: void
{
$method1
=
$this
->
getPaymentMethod
(
)
;
$method1
->
setAppPaymentMethod
(
(
new
AppPaymentMethodEntity
(
)
)
->
assign
(
[
'payUrl' => 'foo'
]
)
)
;
$method2
=
$this
->
getPaymentMethod
(
AsynchronousPaymentHandlerInterface::
class
)
;
$method2
->
setAppPaymentMethod
(
(
new
AppPaymentMethodEntity
(
)
)
->
assign
(
[
'payUrl' => 'foo', 'finalizeUrl' => 'bar'
]
)
)
;
$method3
=
$this
->
getPaymentMethod
(
RefundPaymentHandlerInterface::
class
)
;
$method3
->
setAppPaymentMethod
(
(
new
AppPaymentMethodEntity
(
)
)
->
assign
(
[
'refundUrl' => 'foo'
]
)
)
;
$method4
=
$this
->
getPaymentMethod
(
PreparedPaymentHandlerInterface::
class
)
;
$method4
->
setAppPaymentMethod
(
(
new
AppPaymentMethodEntity
(
)
)
->
assign
(
[
'validateUrl' => 'foo', 'captureUrl' => 'bar'
]
)
)
;
$method5
=
$this
->
getPaymentMethod
(
RecurringPaymentHandlerInterface::
class
)
;