Commit 0a3e26ef authored by GiorgosK's avatar GiorgosK

Add test settings to configuration form

parent f0a129ec
......@@ -40,6 +40,9 @@ class WinbankPaymentRedirect extends OffsitePaymentGatewayBase {
'username' => '',
'password' => '',
'tickets_url' => 'https://paycenter.piraeusbank.gr/services/tickets/issuer.asmx',
'tickets_url_test' => 'http://localhost:8008/ticket.php',
'paycenter_url' => 'https://paycenter.piraeusbank.gr',
'paycenter_url_test' => 'http://localhost:8008/paycenter.php',
'request_type' => '02',
'currency_code' => '978',
'language_code' => 'en-US',
......@@ -108,6 +111,14 @@ class WinbankPaymentRedirect extends OffsitePaymentGatewayBase {
'#default_value' => $this->configuration['tickets_url'],
];
$form['tickets_url_test'] = [
'#type' => 'textfield',
'#required' => TRUE,
'#title' => $this->t('Tickets URL for Test'),
'#description' => $this->t('Winbank (Pireaus) ticketing Web Service URL for Test.'),
'#default_value' => $this->configuration['tickets_url_test'],
];
$form['paycenter_url'] = [
'#type' => 'textfield',
'#required' => TRUE,
......@@ -116,6 +127,14 @@ class WinbankPaymentRedirect extends OffsitePaymentGatewayBase {
'#default_value' => $this->configuration['paycenter_url'],
];
$form['paycenter_url_test'] = [
'#type' => 'textfield',
'#required' => TRUE,
'#title' => $this->t('Paycenter URL For Test'),
'#description' => $this->t('Winbank (Pireaus) Paycenter URL for Test.'),
'#default_value' => $this->configuration['paycenter_url_test'],
];
$form['request_type'] = [
'#type' => 'textfield',
'#required' => TRUE,
......@@ -157,7 +176,9 @@ class WinbankPaymentRedirect extends OffsitePaymentGatewayBase {
$this->configuration['username'] = $values['username'];
$this->configuration['password'] = $values['password'];
$this->configuration['tickets_url'] = $values['tickets_url'];
$this->configuration['tickets_url_test'] = $values['tickets_url_test'];
$this->configuration['paycenter_url'] = $values['paycenter_url'];
$this->configuration['paycenter_url_test'] = $values['paycenter_url_test'];
$this->configuration['currency_code'] = $values['currency_code'];
$this->configuration['language_code'] = $values['language_code'];
$this->configuration['request_type'] = $values['request_type'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment