Skip to content

Commit

Permalink
Service: removed loading global channels by api [closes #13]
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Oct 17, 2014
1 parent 997ef90 commit 27500ce
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions Gopay/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ public function setFailureUrl($absoluteUrl)
*/
public function allowChannel($channel)
{
$this->loadGopayChannels();
if (isset($this->allowedChannels[$channel])) {
return $this;
}
Expand All @@ -283,7 +282,6 @@ public function allowChannel($channel)
*/
public function denyChannel($channel)
{
$this->loadGopayChannels();
if (isset($this->deniedChannels[$channel])) {
return $this;
}
Expand Down Expand Up @@ -492,30 +490,6 @@ public function bindPaymentButton($channel, Nette\Forms\Container $form, $callba
}



/**
* Loads all gopay channels
*
* @throws GopayException on failed communication with WS
*/
private function loadGopayChannels()
{
if ($this->fetchedChannels) {
return;
}

$this->fetchedChannels = TRUE;
$methodList = GopaySoap::paymentMethodList();
if ($methodList === NULL) {
throw new GopayFatalException('Loading of native Gopay payment channels failed due to communication with WS.');
}
foreach ($methodList as $method) {
$this->addRawChannel($method, FALSE);
}
}



/**
* Creates encrypted signature for given given payment session id
*
Expand Down

0 comments on commit 27500ce

Please sign in to comment.