コード例 #1
0
ファイル: callback.php プロジェクト: ventsiwad/presta_addons
                     $orderState = 8;
                 }
                 break;
                 /* error occurred */
             /* error occurred */
             case 30:
                 $orderState = 8;
                 break;
             default:
                 $orderState = 8;
                 break;
         }
         $db = Db::getInstance();
         $OrderID = Tools::substr(Tools::getValue('OrderID'), strpos(Tools::getValue('OrderID'), '~') + 1);
         $orderTotal = Tools::getValue('orderTotal');
         $paymentsense = new PaymentSense();
         $cart = new Cart((int) $OrderID);
         $customer = new Customer((int) $cart->id_customer);
         $AdditionalDetails = array('CrossReference' => $szCrossReference, 'Address Check' => $szAddressNumericCheckResult, 'Postcode Check' => $szPostCodeCheckResult, 'CV2 Check' => $szCV2CheckResult, '3DS Check' => $szThreeDSecureAuthenticationCheckResult);
         /* Update order */
         $paymentsense->validateOrder((int) $OrderID, $orderState, $orderTotal, $paymentsense->displayName, $szMessage, $AdditionalDetails, null, false, $customer->secure_key);
     } catch (Exception $e) {
         $nOutputProcessedOK = 30;
         $szOutputMessage = 'Error updating website system, please ask the developer to check code ' . $e;
     }
 }
 if ($nOutputProcessedOK != 0 && $szOutputMessage == '') {
     $szOutputMessage = 'Unknown error';
 }
 /* output the status code and message letting the payment form know whether the transaction result was processed successfully */
 echo 'StatusCode=' . $nOutputProcessedOK . '&Message=' . Tools::safeOutput($szOutputMessage);
コード例 #2
0
ファイル: failure.php プロジェクト: ventsiwad/presta_addons
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the AFL Academic Free License for more details. You should have received a copy of the
* AFL Academic Free License along with this program. If not, see <http://opensource.org/licenses/AFL-3.0/>.
*
*  @author PaymentSense <*****@*****.**>
*  @copyright  2013 PaymentSense
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*
This file is part of the Prestashop PaymentSense Re-Directed Payment Module
See paymentsense.php for Licensing and support info.
File Last Modified: 12/03/2013 - By Shaun Ponting - Opal Creations
*/
include dirname(__FILE__) . '/../../config/config.inc.php';
include dirname(__FILE__) . '/../../init.php';
include dirname(__FILE__) . '/paymentsense.php';
$paymentsense = new PaymentSense();
if ($paymentsense->active) {
    if ((int) Configuration::get('PS_REWRITING_SETTINGS') === 1) {
        $rewrited_url = __PS_BASE_URI__;
    }
    /*include(dirname(__FILE__).'/../../header.php');*/
    $controller = new FrontController();
    $controller->init();
    $controller->initContent();
    $controller->setMedia();
    $controller->displayHeader();
    if (!isset($link)) {
        $link = new Link();
    }
    $smarty->assign('contactURL', $link->getPageLink('contact-form.php'));
    $smarty->assign('advice', '<a href="javascript: history.go(-1);">' . $paymentsense->l('click here') . '</a>');