Skip to content

Instantly share code, notes, and snippets.

@jdeoliveira
Created June 29, 2012 16:40
Show Gist options
  • Save jdeoliveira/3019077 to your computer and use it in GitHub Desktop.
Save jdeoliveira/3019077 to your computer and use it in GitHub Desktop.
Construction of the credit rejection response by a PHP script
<scripting:component doc:name="Prepare rejection response">
<scripting:script engine="php">
<scripting:text>
<![CDATA[
<?php
$request = json_decode($payload, true);
$response["outcome"] = $message->getProperty("outcome");
$response["maxAmount"] = $request["maxAmount"];
return json_encode($response);
?>
]]>
</scripting:text>
</scripting:script>
</scripting:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment