yield [['finalizeUrl' => 'https://foo.bar/finalize'
], AppAsyncPaymentHandler::
class];
yield [['payUrl' => 'https://foo.bar/pay', 'finalizeUrl' => 'https://foo.bar/finalize'
], AppAsyncPaymentHandler::
class];
yield [['validateUrl' => 'https://foo.bar/validate', 'captureUrl' => 'https://foo.bar/capture'
], AppPaymentHandler::
class];
yield [['refundUrl' => 'https://foo.bar/refund'
], AppPaymentHandler::
class];
yield [['payUrl' => 'https://foo.bar/pay', 'finalizeUrl' => 'https://foo.bar/finalize', 'validateUrl' => 'https://foo.bar/validate', 'captureUrl' => 'https://foo.bar/capture', 'refundUrl' => 'https://foo.bar/refund'
], AppPaymentHandler::
class];
} private function getPaymentMethod(string
$handler): PaymentMethodEntity
{ $criteria =
new Criteria();
$criteria->
addFilter(new EqualsFilter('handlerIdentifier',
$handler));
$criteria->
addAssociation('app'
);
/** @var PaymentMethodEntity|null $method */
$method =
$this->paymentMethodRepository->
search($criteria, Context::
createDefaultContext())->
first();
if (!
$method) { $method =
[ 'id' => Uuid::
randomHex(),
'handlerIdentifier' =>
$handler,
'translations' =>
[ Defaults::LANGUAGE_SYSTEM =>
[ 'name' =>
$handler,
],