Ejemplo n.º 1
0
}
$message = '';
foreach ($_POST as $key => $value) {
    $message .= $key . ': ' . $value . "\n";
}
if (sizeof($errors)) {
    $message .= sizeof($errors) . ' error(s):' . "\n";
    /* Force status to 1 - ERROR ! */
    $_POST['status'] = 1;
}
foreach ($errors as $error) {
    $message .= $error . "\n";
}
$message = nl2br(strip_tags($message));
$status = intval($_POST['status']);
switch ($status) {
    /* Bankwire */
    case 0:
        $moneyBookers->validateOrder(intval($_POST['transaction_id']), _PS_OS_BANKWIRE_, floatval($_POST['mb_amount']), $moneyBookers->displayName, $message);
        break;
        /* Payment OK */
    /* Payment OK */
    case 2:
        $moneyBookers->validateOrder(intval($_POST['transaction_id']), _PS_OS_PAYMENT_, floatval($_POST['mb_amount']), $moneyBookers->displayName, $message);
        break;
        /* Unknown or error */
    /* Unknown or error */
    default:
        $moneyBookers->validateOrder(intval($_POST['transaction_id']), _PS_OS_ERROR_, 0, $moneyBookers->displayName, $message);
        break;
}
Ejemplo n.º 2
0
if (sizeof($errors)) {
    $message .= sizeof($errors) . ' error(s):' . "\n";
    /* Force status to 1 - ERROR ! */
    $_POST['status'] = 1;
}
foreach ($errors as $error) {
    $message .= $error . "\n";
}
$message = nl2br(strip_tags($message));
$id_cart = (int) substr($_POST['transaction_id'], 0, strpos($_POST['transaction_id'], '_'));
$secure_cart = explode('_', $_POST['transaction_id']);
$status = (int) $_POST['status'];
if (!isset($secure_cart[2])) {
    $secure_cart[2] = 'KO';
}
switch ($status) {
    /* Bankwire */
    case 0:
        $moneyBookers->validateOrder((int) $secure_cart[0], Configuration::get('PS_OS_BANKWIRE'), (double) $_POST['amount'], $moneyBookers->displayName, $message, array(), NULL, false, $secure_cart[2]);
        break;
        /* Payment OK */
    /* Payment OK */
    case 2:
        $moneyBookers->validateOrder((int) $secure_cart[0], Configuration::get('PS_OS_PAYMENT'), (double) $_POST['amount'], $moneyBookers->displayName, $message, array(), NULL, false, $secure_cart[2]);
        break;
        /* Unknown or error */
    /* Unknown or error */
    default:
        $moneyBookers->validateOrder((int) $secure_cart[0], Configuration::get('PS_OS_ERROR'), 0, $moneyBookers->displayName, $message, array(), NULL, false, $secure_cart[2]);
        break;
}
Ejemplo n.º 3
0
foreach ($_POST as $key => $value) {
    $message .= $key . ': ' . $value . "\n";
}
if (sizeof($errors)) {
    $message .= sizeof($errors) . ' error(s):' . "\n";
    /* Force status to 1 - ERROR ! */
    $_POST['status'] = 1;
}
foreach ($errors as $error) {
    $message .= $error . "\n";
}
$message = nl2br(strip_tags($message));
$id_cart = (int) substr($_POST['transaction_id'], 0, strpos($_POST['transaction_id'], '_'));
$secure_cart = explode('_', $_POST['transaction_id']);
$status = (int) $_POST['status'];
switch ($status) {
    /* Bankwire */
    case 0:
        $moneyBookers->validateOrder((int) $secure_cart[0], _PS_OS_BANKWIRE_, (double) $_POST['amount'], $moneyBookers->displayName, $message, array(), NULL, false, $secure_cart[2]);
        break;
        /* Payment OK */
    /* Payment OK */
    case 2:
        $moneyBookers->validateOrder((int) $secure_cart[0], _PS_OS_PAYMENT_, (double) $_POST['amount'], $moneyBookers->displayName, $message, array(), NULL, false, $secure_cart[2]);
        break;
        /* Unknown or error */
    /* Unknown or error */
    default:
        $moneyBookers->validateOrder((int) $secure_cart[0], _PS_OS_ERROR_, 0, $moneyBookers->displayName, $message, array(), NULL, false, $secure_cart[2]);
        break;
}