Exemplo n.º 1
0
	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';
	}
Exemplo n.º 2
0
	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';
	}
Exemplo n.º 3
0
	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);
	}