$response->
assign($payload);
return $response;
} /**
* @param array<mixed> $payload
*/
private function validate(array
$payload, string
$actionId): void
{ if (!
isset($payload['iframeUrl'
]) ||
empty($payload['iframeUrl'
])) { throw AppException::
actionButtonProcessException($actionId, 'The app provided an invalid iframeUrl'
);
} if (!
isset($payload['size'
]) || !\
in_array($payload['size'
], self::VALID_MODAL_SIZES, true
)) { throw AppException::
actionButtonProcessException($actionId, 'The app provided an invalid size'
);
} }}