Jump to content

VTPayment & EU_Legal PS 1.6.0.9 Problem


Recommended Posts

Hello,

 

I am not able to let the VTPayment modul work in PS 1.6.0.9 with Multishop enabled ?? 

It still will not give back the payment.tpl – seems there is a problem with objOrder but I don´t know exactly. No Payment Button appears.

Modul hook registration in vtpaymant.php was successful. Test integration on the eu_legal hook "displayPaymentEU" was successful. In vtpayment function it stops at return $html ?

 

here the part of the vtpayment.php:

 
public function hookDisplayPaymentEU($params)
{
 
$html = '';
 
/* Display a form/button that will be sent to VTPayment with the customer details */
 
/* Fixed parameters */
$version = 'VER000000001';
$charset = 'UTF-8';
$trans_type = 'PURC';
$mer_reserve = '';
$acq_id = '99020344';
$payment_schema = 'UP';
$sign_type = 'MD5';
 
$trans_time = date('YmdHis');
 
/* Order related parameters */
$cart_id = (int)$this->context->cart->id;
$order_num = $this->_generateOrderNumber($cart_id, $trans_time);
$order_amount = number_format($this->context->cart->getOrderTotal(true, Cart::BOTH), 2, '.', '');
$order_amount = sprintf('%.2f', $order_amount);
$order_amount = $order_amount * 100;
$order_amount = str_pad( $order_amount, 12, '0', STR_PAD_LEFT);
$order_currency = $this->context->currency->iso_code;
 
/* Configuration parameters */
$gateway_url = Configuration::get('VTPAYMENT_GATEWAY_URL');
$merchant_id = Configuration::get('VTPAYMENT_MERCHANT_ID');
$secret_key = Configuration::get('VTPAYMENT_SECRET_KEY');
 
$front_url = Tools::getShopDomainSsl(true)._MODULE_DIR_.'vtpayment/validation.php';
$back_url = $front_url;
 
$array = array(
'version' => $version,
'charSet' => $charset,
'transType' => $trans_type,
'orderNum' => $order_num,
'orderAmount' => $order_amount,
'orderCurrency' => $order_currency,
'merReserve' => $mer_reserve,
'frontURL' => $front_url,
'backURL' => $back_url,
'merID' => $merchant_id,
'acqID' => $acq_id,
'paymentSchema' => $payment_schema,
'transTime' => $trans_time,
'signType' => $sign_type,
'cart_id' => $cart_id,
);
 
$signature = $this->_generateSignature($array, $secret_key);
 
$this->context->smarty->assign($array + array('signature' => $signature, 'action' => $gateway_url));
 
$html .= $this->display(__FILE__, 'views/templates/hook/payment.tpl');
 
// here it stops
 
return $html; 
}

 

Modul and Info:

https://www.vtpayment.com/download/downloadInf?vdname=PrestaShop&bn=RDDL1&bp 

 

 

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...