getMessage();
}
} else if ('accept' == $answer) {
try {
$response = WebToPay::validateAndParseData($get, $config['projectid'], $config['sign_password']);
if ($response['status'] == 1 || $response['status'] == 2) {
// You can start providing services when you get confirmation with accept url
// Be sure to check if this order is not yet confirmed - user can refresh page anytime
// status 2 means that payment has been got but it's not yet confirmed
// @todo: get order by $response['orderid'], validate test (!), amount and currency
echo 'Your payment has been got successfuly, it will be confirmed shortly
';
}
} catch (Exception $e) {
echo 'Your payment is not yet confirmed, system error
';
}
echo template('Thank you for buying
Orders');
} else {
echo template('