return $responseClass::
create($transactionId, \
json_decode($content, true, 512, \JSON_THROW_ON_ERROR
));
} catch (GuzzleException
) { return null;
} } /**
* @return array<string, mixed>
*/
private function getRequestOptions(SourcedPayloadInterface
$payload, AppEntity
$app, Context
$context): array
{ $payload->
setSource($this->helper->
buildSource($app,
$this->shopUrl
));
$encoded =
$this->helper->
encode($payload);
$jsonPayload =
json_encode($encoded, \JSON_THROW_ON_ERROR
);
if (!
$jsonPayload) { if ($payload instanceof PaymentPayloadInterface
) { throw PaymentException::
asyncProcessInterrupted($payload->
getOrderTransaction()->
getId(), \
sprintf('Empty payload, got: %s',
var_export($jsonPayload, true
)));
} throw PaymentException::
validatePreparedPaymentInterrupted(\
sprintf('Empty payload, got: %s',
var_export($jsonPayload, true
)));
}