Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAG2-333 - Removed outdated payment methods #582

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions Block/Onepage/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,19 +309,6 @@ public function isPayPalExpress()
return false;
}

/**
* Check if paypal express is used
*
* @return bool
*/
public function isPaydirekt()
{
if ($this->_quote->getPayment()->getMethod() == PayoneConfig::METHOD_PAYDIREKT) {
return true;
}
return false;
}

/**
* Generate URL to the fingerprint.js Javascript file
*
Expand Down
1 change: 0 additions & 1 deletion Controller/Onepage/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class Review extends \Magento\Framework\App\Action\Action
protected $availableReviewMethods = [
PayoneConfig::METHOD_PAYPAL,
PayoneConfig::METHOD_PAYPALV2,
PayoneConfig::METHOD_PAYDIREKT,
PayoneConfig::METHOD_AMAZONPAYV2,
];

Expand Down
15 changes: 0 additions & 15 deletions Helper/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,19 +374,4 @@ public function getSubstituteOrderIncrementId($sIncrementId)
->where("payone_cancel_substitute_increment_id = :incrementId");
return $this->getDb()->fetchOne($oSelect, ['incrementId' => $sIncrementId]);
}

/**
* Writes the registered flag to the customer entity
* I'm sure there is a way to do this correctly with the entity object, but Mage2 did everything to prevent this
*
* @param int $iCustomerId
* @return int
*/
public function markUserAsRegisteredWithPaydirekt($iCustomerId)
{
$table = $this->databaseResource->getTableName('customer_entity');
$data = ['payone_paydirekt_registered' => 1];
$where = ['entity_id = ?' => $iCustomerId];
return $this->getDb()->update($table, $data, $where);
}
}
8 changes: 0 additions & 8 deletions Helper/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,11 @@ class Payment extends \Payone\Core\Helper\Base
PayoneConfig::METHOD_ADVANCE_PAYMENT,
PayoneConfig::METHOD_INVOICE,
PayoneConfig::METHOD_OBT_SOFORTUEBERWEISUNG,
#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,
PayoneConfig::METHOD_OBT_IDEAL,
PayoneConfig::METHOD_OBT_PRZELEWY,
PayoneConfig::METHOD_BARZAHLEN,
PayoneConfig::METHOD_PAYDIREKT,
PayoneConfig::METHOD_SAFE_INVOICE,
PayoneConfig::METHOD_PAYOLUTION_INVOICE,
PayoneConfig::METHOD_PAYOLUTION_DEBIT,
Expand All @@ -70,7 +67,6 @@ class Payment extends \Payone\Core\Helper\Base
PayoneConfig::METHOD_KLARNA_INSTALLMENT,
PayoneConfig::METHOD_WECHATPAY,
PayoneConfig::METHOD_RATEPAY_INVOICE,
PayoneConfig::METHOD_TRUSTLY,
PayoneConfig::METHOD_APPLEPAY,
PayoneConfig::METHOD_BANCONTACT,
PayoneConfig::METHOD_BNPL_INVOICE,
Expand All @@ -90,16 +86,13 @@ class Payment extends \Payone\Core\Helper\Base
PayoneConfig::METHOD_ADVANCE_PAYMENT => 'vor',
PayoneConfig::METHOD_INVOICE => 'rec',
PayoneConfig::METHOD_OBT_SOFORTUEBERWEISUNG => 'sb',
PayoneConfig::METHOD_OBT_GIROPAY => 'sb',
PayoneConfig::METHOD_OBT_EPS => 'sb',
PayoneConfig::METHOD_OBT_POSTFINANCE_EFINANCE => 'sb',
PayoneConfig::METHOD_OBT_POSTFINANCE_CARD => 'sb',
PayoneConfig::METHOD_OBT_IDEAL => 'sb',
PayoneConfig::METHOD_OBT_PRZELEWY => 'sb',
PayoneConfig::METHOD_PAYPAL => 'wlt',
PayoneConfig::METHOD_PAYPALV2 => 'wlt',
PayoneConfig::METHOD_PAYDIREKT => 'wlt',
PayoneConfig::METHOD_BARZAHLEN => 'csh',
PayoneConfig::METHOD_SAFE_INVOICE => 'rec',
PayoneConfig::METHOD_PAYOLUTION_INVOICE => 'fnc',
PayoneConfig::METHOD_PAYOLUTION_DEBIT => 'fnc',
Expand All @@ -113,7 +106,6 @@ class Payment extends \Payone\Core\Helper\Base
PayoneConfig::METHOD_KLARNA_INSTALLMENT => 'wlt',
PayoneConfig::METHOD_WECHATPAY => 'wlt',
PayoneConfig::METHOD_RATEPAY_INVOICE => 'fnc',
PayoneConfig::METHOD_TRUSTLY => 'sb',
PayoneConfig::METHOD_APPLEPAY => 'wlt',
PayoneConfig::METHOD_BANCONTACT => 'sb',
];
Expand Down
2 changes: 1 addition & 1 deletion Model/Api/Request/Authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected function setUserParameters(PayoneMethod $oPayment, Order $oOrder)
$oShipping = $oOrder->getShippingAddress(); // get shipping address from order
if ($oShipping) {// shipping address existing?
$this->addAddress($oShipping, true); // add regular shipping address
} elseif ($oPayment->getCode() == PayoneConfig::METHOD_PAYDIREKT || ($oPayment->getCode() == PayoneConfig::METHOD_PAYPAL && $this->shopHelper->getConfigParam('bill_as_del_address', PayoneConfig::METHOD_PAYPAL, 'payone_payment', $this->storeCode))) {
} elseif ($oPayment->getCode() == PayoneConfig::METHOD_PAYPAL && $this->shopHelper->getConfigParam('bill_as_del_address', PayoneConfig::METHOD_PAYPAL, 'payone_payment', $this->storeCode)) {
$this->addAddress($oOrder->getBillingAddress(), true); // add billing address as shipping address
}
}
Expand Down
2 changes: 0 additions & 2 deletions Model/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,11 @@ protected function getPayoneConfig()
'availableApplePayTypes' => $this->paymentHelper->getAvailableApplePayTypes(),
'fieldConfig' => $this->hostedIframeHelper->getHostedFieldConfig(),
'sepaCountries' => $this->countryHelper->getEnabledCountries(PayoneConfig::METHOD_DEBIT),
'trustlyCountries' => $this->countryHelper->getEnabledCountries(PayoneConfig::METHOD_TRUSTLY),
'hostedRequest' => $this->requestHelper->getHostedIframeRequest(),
'mandateManagementActive' => $this->paymentHelper->isMandateManagementActive(),
'checkCvc' => (bool)$this->paymentHelper->isCheckCvcActive(),
'ccMinValidity' => $this->requestHelper->getConfigParam('min_validity_period', PayoneConfig::METHOD_CREDITCARD, 'payone_payment'),
'requestBic' => (bool)$this->requestHelper->getConfigParam('request_bic', PayoneConfig::METHOD_DEBIT, 'payone_payment'),
'trustlyRequestBic' => (bool)$this->requestHelper->getConfigParam('request_bic', PayoneConfig::METHOD_TRUSTLY, 'payone_payment'),
'validateBankCode' => (bool)$this->requestHelper->getConfigParam('check_bankaccount', PayoneConfig::METHOD_DEBIT, 'payone_payment'),
'disableSafeInvoice' => (bool)$this->requestHelper->getConfigParam('disable_after_refusal', PayoneConfig::METHOD_SAFE_INVOICE, 'payone_payment'),
'bankaccountcheckRequest' => $this->requestHelper->getBankaccountCheckRequest(),
Expand Down
93 changes: 0 additions & 93 deletions Model/Methods/Barzahlen.php

This file was deleted.

2 changes: 1 addition & 1 deletion Model/Methods/BaseMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ abstract class BaseMethod extends AbstractMethod

/**
* Determines if payment type can use partial captures
* Is true for all PAYONE Payment Methods except Barzahlen
* Is true for all PAYONE Payment Methods
*
* @var bool
*/
Expand Down
87 changes: 0 additions & 87 deletions Model/Methods/OnlineBankTransfer/Giropay.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class OnlineBankTransferBase extends \Payone\Core\Model\Methods\PayoneMethod
{
/* Payment method sub types */
const METHOD_OBT_SUBTYPE_SOFORTUEBERWEISUNG = 'PNT';
const METHOD_OBT_SUBTYPE_GIROPAY = 'GPY';
const METHOD_OBT_SUBTYPE_EPS = 'EPS';
const METHOD_OBT_SUBTYPE_POSTFINANCE_EFINANCE = 'PFF';
const METHOD_OBT_SUBTYPE_POSTFINANCE_CARD = 'PFC';
Expand Down
Loading
Loading