Files
grzanieplus.pl/plugins/cvIngPlugin/lib/cvIngPlugin.class.php
2025-03-12 17:06:23 +01:00

47 lines
1.1 KiB
PHP

<?php
class cvIngPlugin {
public static $version = '1.1.0';
protected $config;
public function __construct() {
$this->config = stPaymentType::getConfiguration('cvIngBackend');
}
public function __call($method, $arguments)
{
return stPaymentType::call($method, $this->config);
}
public function checkPaymentConfiguration($imojeOnly = 0) {
if (!$this->hasClientId()){
return false;
}
if (!$this->hasShopId()){
return false;
}
if (!$this->hasShopKey()){
return false;
}
if($imojeOnly){
return true;
}
return true;
}
public static function getTwistoPaymentIds(){
$c=new Criteria();
$c->addSelectColumn(PaymentTypePeer::ID);
$c->add(PaymentTypePeer::MODULE_NAME, 'cvIngTwisto');
$rowset = PaymentTypePeer::doSelectRS($c);
$rowset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$result = array();
foreach($rowset as $row){
$result[] = $row['ID'];
}
return $result;
}
}