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
)));
} $secret =
$app->
getAppSecret();
if ($secret === null
) { throw AppException::
registrationFailed($app->
getName(), 'App secret is missing'
);
} return [ AuthMiddleware::APP_REQUEST_CONTEXT =>
$context,
AuthMiddleware::APP_REQUEST_TYPE =>
[ AuthMiddleware::APP_SECRET =>
$secret,
AuthMiddleware::VALIDATED_RESPONSE => true,
],
'headers' =>
[ 'Content-Type' => 'application/json',
],