Exemplo n.º 1
0
function runExternal(Destination $destination, $purpose)
{
    $destination->setAmount($_POST['amount']);
    $destination->setPurpose1($purpose);
    $destination->setPurpose2($_POST['purpose1']);
    $url = $destination->getUrl();
    $params = http_build_query($destination->getParams());
    $completeUrl = $url . '?' . $params;
    header('Location: ' . $completeUrl);
}