Skip to content

Commit

Permalink
Merge pull request PAYONE-GmbH#533 from FatchipRobert/MAG2-305-Paydirekt
Browse files Browse the repository at this point in the history
MAG2-305 - Paydirekt is now Giropay
  • Loading branch information
janteuber authored Mar 26, 2024
2 parents df86f21 + 8662b16 commit ca57a22
Show file tree
Hide file tree
Showing 29 changed files with 79 additions and 1,197 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;
}
}
2 changes: 1 addition & 1 deletion Helper/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Payment extends \Payone\Core\Helper\Base
PayoneConfig::METHOD_ADVANCE_PAYMENT,
PayoneConfig::METHOD_INVOICE,
PayoneConfig::METHOD_OBT_SOFORTUEBERWEISUNG,
PayoneConfig::METHOD_OBT_GIROPAY,
#PayoneConfig::METHOD_OBT_GIROPAY,#Giropay has been disabled, Paydirekt is now Giropay
PayoneConfig::METHOD_OBT_EPS,
PayoneConfig::METHOD_OBT_POSTFINANCE_EFINANCE,
PayoneConfig::METHOD_OBT_POSTFINANCE_CARD,
Expand Down
Loading

0 comments on commit ca57a22

Please sign in to comment.