Skip to content

Commit

Permalink
MA2-305 - Removed Paydirekt Oneklick
Browse files Browse the repository at this point in the history
  • Loading branch information
FatchipRobert committed Mar 21, 2024
1 parent 8dbb57b commit 8662b16
Show file tree
Hide file tree
Showing 23 changed files with 0 additions and 1,180 deletions.
13 changes: 0 additions & 13 deletions Block/Onepage/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,19 +337,6 @@ public function getFingerprintJsUrl()
return $asset->getUrl();
}

/**
* Check if paydirekt email message has to be shown
*
* @return bool
*/
public function showPaydirektEmailMessage()
{
if ($this->_quote->getPayment()->getMethod() == PayoneConfig::METHOD_PAYDIREKT && $this->databaseHelper->getPaydirektOneklickOrderCount($this->_quote->getCustomerId()) == 0) {
return true;
}
return false;
}

/**
* Retrieve payment method and assign additional template values
*
Expand Down
91 changes: 0 additions & 91 deletions Block/Paydirekt/OneklickButton.php

This file was deleted.

158 changes: 0 additions & 158 deletions Controller/Paydirekt/Agreement.php

This file was deleted.

20 changes: 0 additions & 20 deletions Helper/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,24 +389,4 @@ public function markUserAsRegisteredWithPaydirekt($iCustomerId)
$where = ['entity_id = ?' => $iCustomerId];
return $this->getDb()->update($table, $data, $where);
}

/**
* Selects count of paydirekt oneclick orders from database
*
* @param int $iCustomerId
* @return int
*/
public function getPaydirektOneklickOrderCount($iCustomerId)
{
$oSelect = $this->getDb()
->select()
->from($this->databaseResource->getTableName('sales_order'), ['COUNT(entity_id)'])
->where("customer_id = :customerId")
->where("payone_express_type = :expressType");
$iCount = $this->getDb()->fetchOne($oSelect, ['customerId' => $iCustomerId, 'expressType' => PayoneConfig::METHOD_PAYDIREKT]);
if ($iCount === null) {
return 0;
}
return $iCount;
}
}
Loading

0 comments on commit 8662b16

Please sign in to comment.