private function getPaymentHandler() { $payment = new MoneyBookers($this->details); $payment->setConfigValue('email', '*****@*****.**'); $payment->setConfigValue('description', 'test'); $payment->setConfigValue('secretWord', 'test'); $payment->setSiteUrl('http://localhost'); return $payment; }
* * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <*****@*****.**> * @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 7732 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ include dirname(__FILE__) . '/../../config/config.inc.php'; include dirname(__FILE__) . '/moneybookers.php'; $moneyBookers = new MoneyBookers(); $errors = array(); /* Check for mandatory fields */ $requiredFields = array('status', 'md5sig', 'merchant_id', 'pay_to_email', 'mb_amount', 'mb_transaction_id', 'currency', 'amount', 'transaction_id', 'pay_from_email', 'mb_currency'); foreach ($requiredFields as $field) { if (!isset($_POST[$field])) { $errors[] = 'Missing field ' . $field; } } /* Check for MD5 signature */ $md5 = strtoupper(md5($_POST['merchant_id'] . $_POST['transaction_id'] . strtoupper(md5(Configuration::get('MB_SECRET_WORD'))) . $_POST['mb_amount'] . $_POST['mb_currency'] . $_POST['status'])); if ($md5 != $_POST['md5sig']) { $errors[] = 'Please double-check your Moneybookers account to make sure you have received the payment (Yours / MB) [' . $md5 . '] [' . $_POST['md5sig'] . ']'; } $message = ''; foreach ($_POST as $key => $value) {
<?php include dirname(__FILE__) . '/../../config/config.inc.php'; include dirname(__FILE__) . '/moneybookers.php'; $moneyBookers = new MoneyBookers(); $errors = array(); /* Check for mandatory fields */ $requiredFields = array('status', 'md5sig', 'merchant_id', 'pay_to_email', 'mb_amount', 'mb_transaction_id', 'currency', 'amount', 'transaction_id', 'pay_from_email', 'mb_currency'); foreach ($requiredFields as $field) { if (!isset($_POST[$field])) { $errors[] = 'Missing field ' . $field; } } /* Check for MD5 signature */ $md5 = strtoupper(md5($_POST['merchant_id'] . $_POST['transaction_id'] . strtoupper(md5(Configuration::get('MB_SECRET_WORD'))) . $_POST['mb_amount'] . $_POST['mb_currency'] . $_POST['status'])); if ($md5 != $_POST['md5sig']) { $errors[] = 'Please double-check your Moneybookers account to make sure you have received the payment (Yours / MB) [' . $md5 . '] [' . $_POST['md5sig'] . ']'; } $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));
* * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <*****@*****.**> * @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 1.4 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ include dirname(__FILE__) . '/../../config/config.inc.php'; include dirname(__FILE__) . '/moneybookers.php'; $moneyBookers = new MoneyBookers(); $errors = array(); /* Check for mandatory fields */ $requiredFields = array('status', 'md5sig', 'merchant_id', 'pay_to_email', 'mb_amount', 'mb_transaction_id', 'currency', 'amount', 'transaction_id', 'pay_from_email', 'mb_currency'); foreach ($requiredFields as $field) { if (!isset($_POST[$field])) { $errors[] = 'Missing field ' . $field; } } /* Check for MD5 signature */ $md5 = strtoupper(md5($_POST['merchant_id'] . $_POST['transaction_id'] . strtoupper(md5(Configuration::get('MB_SECRET_WORD'))) . $_POST['mb_amount'] . $_POST['mb_currency'] . $_POST['status'])); if ($md5 != $_POST['md5sig']) { $errors[] = 'Please double-check your Moneybookers account to make sure you have received the payment (Yours / MB) [' . $md5 . '] [' . $_POST['md5sig'] . ']'; } $message = ''; foreach ($_POST as $key => $value) {