diff --git a/paynlpaymentmethods/paynlpaymentmethods.php b/paynlpaymentmethods/paynlpaymentmethods.php index 001403b..b5c5281 100644 --- a/paynlpaymentmethods/paynlpaymentmethods.php +++ b/paynlpaymentmethods/paynlpaymentmethods.php @@ -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, @@ -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);