Jump to content

Quickpay 404


Alexanderleo

Recommended Posts

Har du tjekket om filen er tom? Installeret modulet igen? Hvilken quickpay version er det og hvilken shopversion. Uden disse oplysninger, er det næsten som at bede os lede efter din tabte nål i en høstak.

Dette står der i filen

 

Kjeld: Jeg kiggerl ige i error loggen, og skriver tilbage.

<?php

include(dirname(__FILE__).'/../../config/config.inc.php');

include(dirname(__FILE__).'/../../init.php');

require_once(dirname(__FILE__).'/quickpay.php');





$msgtype= Tools::getValue('msgtype');

$ordernumber= Tools::getValue('ordernumber');

$amount= Tools::getValue('amount');

$currency= Tools::getValue('currency');

$time= Tools::getValue('time');

$state= Tools::getValue('state');

$qpstat= Tools::getValue('qpstat');

$qpstatmsg= Tools::getValue('qpstatmsg');

$chstat= Tools::getValue('chstat');

$chstatmsg= Tools::getValue('chstatmsg');

$merchant= Tools::getValue('merchant');

$merchantemail= Tools::getValue('merchantemail');

$transaction= Tools::getValue('transaction');

$cardtype= Tools::getValue('cardtype');

$cardnumber= Tools::getValue('cardnumber');

$cardhash= Tools::getValue('cardhash');

$splitpayment = Tools::getValue('splitpayment');

$acquirer = Tools::getValue('acquirer');

$fraudprobability = Tools::getValue('fraudprobability');

$fraudremarks = Tools::getValue('fraudremarks');

$fraudreport = Tools::getValue('fraudreport');

$fee = Tools::getValue('fee');

$md5checkget = Tools::getValue('md5check');



$quickpay = new Quickpay();

$cartId = substr($ordernumber, 3);

$cart = new Cart(intval($cartId));

if ($quickpay->v15)

  Shop::setContext(Shop::CONTEXT_SHOP, $cart->id_shop);



$md5 = Configuration::get('_QUICKPAY_MD5');

$autofee = Configuration::get('_QUICKPAY_AUTOFEE');



$md5check = md5($msgtype.$ordernumber.$amount.$currency.$time.$state.$qpstat.$qpstatmsg.$chstat.$chstatmsg.$merchant.$merchantemail.$transaction.$cardtype.$cardnumber.$cardhash.$acquirer.$splitpayment.$fraudprobability.$fraudremarks.$fraudreport.$fee.$md5);

$dbTable = _DB_PREFIX_.'quickpay_transactions';



//echo $cart->secure_key;

//echo 'og';

if ($cart->OrderExists() == 0) {

  //echo 'og';

  if ($md5checkget == $md5check) {

    if ($qpstat == '000') {

      $amount1 = number_format(($amount - $fee) / 100, 2, ".", "");

      $query = "INSERT INTO $dbTable (md5check, cardnumber, card_type, msgtype, id_cart, amount, currency, time, state, qpstat, qpstatmsg, chstat, chstatmsg, merchant, transaction)

	VALUES ('$md5checkget', '$cardnumber', '$cardtype', '$msgtype', '$cartId', '$amount','$currency', '$time', '$state', '$qpstat', '$qpstatmsg', '$chstat', '$chstatmsg', '$merchant', '$transaction')";

      Db::getInstance()->Execute($query);

      $extra_vars = array('transaction_id' => $transaction, 'cardtype' => $cardtype);

      if ($quickpay->v14) {

	if ($quickpay->validateOrder($cartId, _PS_OS_PAYMENT_, $amount1, $quickpay->displayName, NULL, $extra_vars, NULL, false, $cart->secure_key))

	{

	  $orderId = Order::getOrderByCartId($cartId);

	}

	else {

	  echo "Prestashop error - unable to process order..";

	}

      }

      else {

	if ($quickpay->validateOrder($cartId, _PS_OS_PAYMENT_, $amount1, $cardtype, NULL, $extra_vars, NULL, false))

	{

	  $orderId = Order::getOrderByCartId($cartId);

	}

	else {

	  echo "Prestashop error - unable to process order..";

	}

      }

    }

  }

}



?>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...