You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
833 B
PHP
50 lines
833 B
PHP
<?php
|
|
|
|
abstract class Paymentwall_Instance
|
|
{
|
|
protected $config;
|
|
protected $errors = array();
|
|
|
|
public function getErrorSummary()
|
|
{
|
|
return implode("\n", $this->getErrors());
|
|
}
|
|
|
|
protected function getConfig()
|
|
{
|
|
if (!isset($this->config)) {
|
|
$this->config = Paymentwall_Config::getInstance();
|
|
}
|
|
return $this->config;
|
|
}
|
|
|
|
protected function getApiBaseUrl()
|
|
{
|
|
return $this->getConfig()->getApiBaseUrl();
|
|
}
|
|
|
|
protected function getApiType()
|
|
{
|
|
return $this->getConfig()->getLocalApiType();
|
|
}
|
|
|
|
protected function getPublicKey()
|
|
{
|
|
return $this->getConfig()->getPublicKey();
|
|
}
|
|
|
|
protected function getPrivateKey()
|
|
{
|
|
return $this->getConfig()->getPrivateKey();
|
|
}
|
|
|
|
protected function appendToErrors($error = '')
|
|
{
|
|
$this->errors[] = $error;
|
|
}
|
|
|
|
protected function getErrors()
|
|
{
|
|
return $this->errors;
|
|
}
|
|
} |