protected function getModeFromCardType($t) { // $t is Shopware_Controllers_Backend_BuiswPayOne::$creditcards [value] foreach (Shopware_Controllers_Backend_BuiswPaymentPayone::$creditcards as $c) { if ($c['value'] == $t) { $key = $c['key'] . '_mode'; return Shopware_Controllers_Backend_BuiswPaymentPayone::Config($key); } } return 'test'; }
protected function getAuthMode($subpay) { switch ($subpay) { case 'creditcard': $key = $this->search_multi_array($usersettings['payonesubpay_creditcard_card'], Shopware_Controllers_Backend_BuiswPaymentPayone::$creditcards); $subpay = Shopware_Controllers_Backend_BuiswPaymentPayone::$creditcards[$key]['key']; break; case 'onlinepay': $key = $this->search_multi_array($usersettings['payonesubpay_creditcard_card'], Shopware_Controllers_Backend_BuiswPaymentPayone::$creditcards); $subpay = Shopware_Controllers_Backend_BuiswPaymentPayone::$creditcards[$key]['key']; break; } $m = Shopware_Controllers_Backend_BuiswPaymentPayone::Config($subpay . '_authmethod'); return ($m == 'auth') ? 'authorization' : 'preauthorization'; }
protected function checkPaymentScore($key, $cScore, $allowedScores) { $res = ($cScore->status == false); $res |= in_array(Shopware_Controllers_Backend_BuiswPaymentPayone::Config($key . "_ampelwert"), $allowedScores[$cScore->ampelwert]); $res |= ($cScore->infoscore > Shopware_Controllers_Backend_BuiswPaymentPayone::Config($key . "_boniscore")); return (Shopware_Controllers_Backend_BuiswPaymentPayone::Config($key . "_active") == "on" && $res); }