Skip to content

Commit

Permalink
Fixed a bug,
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Pieters committed Sep 27, 2017
1 parent af3e577 commit aa64694
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions upload/Pay/Controller/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ public function index()

$settings = $this->model_setting_setting->getSetting('payment_' . $this->_paymentMethodName);

$settings = $settings + $this->request->post;
$settings = array_merge($settings, $this->request->post);
if ($this->request->server['REQUEST_METHOD'] == 'POST' && $this->validate()) {
$settings['payment_paynl_apitoken'] = $settings['payment_' . $this->_paymentMethodName . '_apitoken'];
$settings['payment_paynl_serviceid'] = $settings['payment_' . $this->_paymentMethodName . '_serviceid'];
$settingsGeneral = array(
'payment_paynl_general_apitoken' => $settings['payment_'.$this->_paymentMethodName.'_apitoken'],
'payment_paynl_general_serviceid' => $settings['payment_'.$this->_paymentMethodName.'_serviceid']

$this->model_setting_setting->editSetting('payment_paynl', $settings);
);
$this->model_setting_setting->editSetting('payment_paynl_general', $settingsGeneral);

$this->model_setting_setting->editSetting('payment_' . $this->_paymentMethodName, $settings);
$this->session->data['success'] = $this->language->get('text_success');

$this->response->redirect($this->url->link('marketplace/extension', 'user_token=' . $this->session->data['user_token'] . '&type=payment', true));
Expand All @@ -55,10 +59,10 @@ public function index()
}

if(!isset($data['apitoken']) || empty($data['apitoken'])){
$data['apitoken'] = $this->config->get('payment_paynl_apitoken');
$data['apitoken'] = $this->config->get('payment_paynl_general_apitoken');
}
if(!isset($data['serviceid']) || empty($data['serviceid'])){
$data['serviceid'] = $this->config->get('payment_paynl_serviceid');
$data['serviceid'] = $this->config->get('payment_paynl_general_serviceid');
}


Expand Down

0 comments on commit aa64694

Please sign in to comment.