Skip to content

Commit

Permalink
add check to variabels
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinverschoor committed Nov 5, 2020
1 parent 4f3db35 commit 5de1e54
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion paynlpaymentmethods/paynlpaymentmethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,17 @@ public function startPayment(Cart $cart, $payment_option_id, $extra_data = array
$description = Configuration::get('PAYNL_DESCRIPTION_PREFIX') . $description;
}

$object_string = 'prestashop ';
if(isset($this->version) && !empty($this->version)){
$object_string .= $this->version;
}
if(defined('_PS_VERSION_') && !empty(_PS_VERSION_)){
$object_string .= ' | ' . _PS_VERSION_;
}
if(defined('PHP_VERSION') && !empty(PHP_VERSION)){
$object_string .= ' | ' . PHP_VERSION;
}

$startData = array(
'amount' => $cart->getOrderTotal(true, Cart::BOTH, null, null, false),
'currency' => $currency->iso_code,
Expand All @@ -736,7 +747,7 @@ public function startPayment(Cart $cart, $payment_option_id, $extra_data = array
'testmode' => Configuration::get('PAYNL_TEST_MODE'),
'extra1' => $cart->id,
'products' => $products,
'object' => substr('prestashop '. $this->version . ' | ' . _PS_VERSION_ . ' | ' . PHP_VERSION, 0, 64),
'object' => substr($object_string, 0, 64),
);

$addressData = $this->_getAddressData($cart);
Expand Down

0 comments on commit 5de1e54

Please sign in to comment.