Hi,
Please edit your paypal advanced plugin "plugins/hikashoppayment/paypaladvanced/paypaladvanced.php" and update the content of the last function
function onPaymentConfigurationSave(&$element) {
parent::onPaymentConfigurationSave($element);
$secret = $element->payment_params->secret_code;
if(empty($element->payment_id)) {
$pluginClass = hikashop_get('class.payment');
$status = $pluginClass->save($element);
if(!$status)
return true;
$element->payment_id = $status;
}
$app = JFactory::getApplication();
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.path');
$lang = JFactory::getLanguage();
$locale = strtolower(substr($lang->get('tag'),0,2));
$content = '<?php
$_GET[\'option\']=\'com_hikashop\';
$_GET[\'tmpl\']=\'component\';
$_GET[\'ctrl\']=\'checkout\';
$_GET[\'task\']=\'notify\';
$_GET[\'notif_payment\']=\'paypaladvanced\';
$_GET[\'format\']=\'html\';
$_GET[\'lang\']=\''.$locale.'\';
$_GET[\'notif_id\']=\''.$element->payment_id.'\';
$_GET[\'secret_code\']=\''.$secret.'\';
$_REQUEST[\'option\']=\'com_hikashop\';
$_REQUEST[\'tmpl\']=\'component\';
$_REQUEST[\'ctrl\']=\'checkout\';
$_REQUEST[\'task\']=\'notify\';
$_REQUEST[\'notif_payment\']=\'paypaladvanced\';
$_REQUEST[\'format\']=\'html\';
$_REQUEST[\'lang\']=\''.$locale.'\';
$_REQUEST[\'notif_id\']=\''.$element->payment_id.'\';
$_REQUEST[\'secret_code\']=\''.$secret.'\';
include(\'index.php\');';
JFile::write(JPATH_ROOT.DS.'paypaladvanced_'.$element->payment_id.'_'.$secret.'.php', $content);
return true;
}
By:
function onPaymentConfigurationSave(&$element) {
parent::onPaymentConfigurationSave($element);
$secret = $element->payment_params->secret_code;
if(empty($element->payment_id)) {
$pluginClass = hikashop_get('class.payment');
$status = $pluginClass->save($element);
if(!$status)
return true;
$element->payment_id = $status;
}
jimport('joomla.filesystem.file');
$lang = JFactory::getLanguage();
$locale = strtolower(substr($lang->get('tag'), 0, 2));
$opts = array(
'option' => 'com_hikashop',
'tmpl' => 'component',
'ctrl' => 'checkout',
'task' => 'notify',
'notif_payment' => $this->name,
'format' => 'html',
'local' => $locale,
'notif_id' => $element->payment_id,
);
$content = '<?php' . "\r\n";
foreach($opts as $k => $v) {
$v = str_replace(array('\'','\\'), '', $v);
$content .= '$_GET[\''.$k.'\']=\''.$v.'\';'."\r\n".
'$_REQUEST[\''.$k.'\']=\''.$v.'\';'."\r\n";
}
$content .= 'include(\'index.php\');'."\r\n";
JFile::write(JPATH_ROOT.DS.$this->name.'_'.$element->payment_id.'.php', $content);
//
$opts['secret_code'] = $secret;
$content = '<?php' . "\r\n";
foreach($opts as $k => $v) {
$v = str_replace(array('\'','\\'), '', $v);
$content .= '$_GET[\''.$k.'\']=\''.$v.'\';'."\r\n".
'$_REQUEST[\''.$k.'\']=\''.$v.'\';'."\r\n";
}
$content .= 'include(\'index.php\');'."\r\n";
JFile::write(JPATH_ROOT.DS.$this->name.'_'.$element->payment_id.'_'.$secret.'.php', $content);
return true;
}
Then you will need to re-save your paypal advanced configuration.
So you will have two "paypaladvanced" php file in the root of your Joomla website ; one for the private notification and another for the user return.
Regards,