Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
8283ed7
BP-3700-Change-Zend-to-Laminas
AlbinaBaraliu Sep 16, 2024
ee5c8e8
Merge pull request #1052 from buckaroo-it/BP-3700-Change-Zend-to-Laminas
AlbinaBaraliu Sep 26, 2024
e229805
BP-3784-Remove-Giropay-Magento-2
AlbinaBaraliu Sep 27, 2024
2a4122a
Apply logo changes from media repository
AlbinaBaraliu Sep 27, 2024
8f6698d
Merge pull request #1069 from buckaroo-it/BP-3784-Remove-Giropay-Mage…
AlbinaBaraliu Sep 27, 2024
3d997f1
BP-3663-Buckaroo Payment Fee Prices does not make a difference (Tax s…
SandervdHulst Oct 2, 2024
2f617cc
BP-3663-Buckaroo Payment Fee Prices does not make a difference (Tax s…
SandervdHulst Oct 3, 2024
3630143
remove grand total
vegimcarkaxhija Oct 9, 2024
f69c96f
refactor files
vegimcarkaxhija Oct 9, 2024
da9950b
refactor files
vegimcarkaxhija Oct 9, 2024
18dfa34
refactor files
vegimcarkaxhija Oct 9, 2024
f7ec4ee
refactor files
vegimcarkaxhija Oct 9, 2024
9e5808e
refactor files
vegimcarkaxhija Oct 11, 2024
baaae7b
refactor files
vegimcarkaxhija Oct 11, 2024
69b233d
remove use of grand-total.js
vegimcarkaxhija Oct 11, 2024
b152a30
add Remaining amount under grand total
vegimcarkaxhija Oct 14, 2024
a929dae
remove comments
vegimcarkaxhija Oct 15, 2024
aa92d15
Merge pull request #1071 from buckaroo-it/BP-3761-Adjustment-in-the-m…
vegimcarkaxhija Oct 15, 2024
ea69d18
I have refactored the implementation of the "Fast Checkout iDEAL" but…
vegimcarkaxhija Oct 16, 2024
a55e8ed
Merge pull request #1073 from buckaroo-it/BP-3838-Refactor-Fast-Check…
vegimcarkaxhija Oct 16, 2024
22587d8
Merge pull request #1074 from buckaroo-it/BP-3663-Buckaroo-Payment-Fe…
SandervdHulst Oct 18, 2024
9256d07
fix API schema
vegimcarkaxhija Oct 21, 2024
8c6b76c
Merge pull request #1075 from buckaroo-it/BP-3843-v1.50-breaks-Magent…
vegimcarkaxhija Oct 21, 2024
9069e2d
update ideal fast checkout email sender
vegimcarkaxhija Oct 22, 2024
fd85e17
Merge pull request #1077 from buckaroo-it/BP-3826-iDEAL-Fast-Checkout…
vegimcarkaxhija Oct 22, 2024
2ee4bc5
fix ideal fastcheckout shippingcost
vegimcarkaxhija Oct 22, 2024
b4ca17a
Merge pull request #1078 from buckaroo-it/BP-3697-iDEAL-fast-checkout…
vegimcarkaxhija Oct 23, 2024
c9c0a6f
BP-3847-Tax percentage not send in request for Riverty/Klarna/Billink
SandervdHulst Oct 23, 2024
9deeef7
BP-3847-Tax percentage not send in request for Riverty/Klarna/Billink
SandervdHulst Oct 23, 2024
475198b
BP-3847-Tax percentage not send in request for Riverty/Klarna/Billink
SandervdHulst Oct 23, 2024
d2b388d
Merge pull request #1079 from buckaroo-it/BP-3847-Tax-percentage-not-…
SandervdHulst Oct 23, 2024
a4d181e
add csp_whitelist for applePay and Payconiq
vegimcarkaxhija Oct 24, 2024
866c37b
Merge pull request #1080 from buckaroo-it/BP-3856-Add-CSP-allow-list-…
vegimcarkaxhija Oct 24, 2024
a8241b2
update settings for fast payments
vegimcarkaxhija Oct 24, 2024
0d8f9db
Merge pull request #1082 from buckaroo-it/BP-3859-Check-settings-for-…
vegimcarkaxhija Oct 24, 2024
7429b73
update applepay
vegimcarkaxhija Nov 1, 2024
679abeb
update applepay
vegimcarkaxhija Nov 1, 2024
2f5b1ee
update applepay
vegimcarkaxhija Nov 1, 2024
f67f99a
update applepay
vegimcarkaxhija Nov 1, 2024
081b457
update applepay
vegimcarkaxhija Nov 5, 2024
5e0c065
update applepay
vegimcarkaxhija Nov 5, 2024
068b3ee
update applepay
vegimcarkaxhija Nov 5, 2024
d24adfc
Merge pull request #1083 from buckaroo-it/BP-3856-Add-CSP-allow-list-…
vegimcarkaxhija Nov 5, 2024
df6e776
BP-3861-Add-EUR-currency-for-Przelewy24
AlbinaBaraliu Nov 5, 2024
1824205
Merge pull request #1086 from buckaroo-it/BP-3861-Add-EUR-currency-fo…
AlbinaBaraliu Nov 5, 2024
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
4 changes: 1 addition & 3 deletions Api/Data/QuoteCreateResponseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
*/
namespace Buckaroo\Magento2\Api\Data;

use Buckaroo\Magento2\Api\Data\BreakdownItemInterface;

interface QuoteCreateResponseInterface extends BreakdownItemInterface
{
/**
Expand All @@ -36,4 +34,4 @@ public function getBreakdown();
* @return string
*/
public function getCartId();
}
}
5 changes: 1 addition & 4 deletions Api/IdealQuoteCreateInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@

namespace Buckaroo\Magento2\Api;

use Buckaroo\Magento2\Api\Data\QuoteCreateResponseInterface;
use Buckaroo\Magento2\Api\Data\Ideal\ShippingAddressRequestInterface;

interface IdealQuoteCreateInterface
{
/**
* Get order breakdown after shipping is applied
*
* @param string $page
* @param string|null $order_data
* @return QuoteCreateResponseInterface
* @return \Buckaroo\Magento2\Api\Data\QuoteCreateResponseInterface
*/
public function execute(
string $page,
Expand Down
5 changes: 2 additions & 3 deletions Api/PayWithGiftcardInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@

use Buckaroo\Magento2\Api\Data\Giftcard\PayRequestInterface;

interface PayWithGiftcardInterface
interface PayWithGiftcardInterface
{
/**
* Rest method for paying with giftcards
*
* @param string $cartId
* @param string $giftcardId
* @param \Buckaroo\Magento2\Api\Data\Giftcard\PayRequestInterface $requestBody
*
* @param \Buckaroo\Magento2\Api\Data\Giftcard\PayRequestInterface $payment
* @return \Buckaroo\Magento2\Api\Data\Giftcard\PayResponseInterface
*/
public function pay(string $cartId, string $giftcardId, PayRequestInterface $payment);
Expand Down
3 changes: 1 addition & 2 deletions Api/PaypalExpressQuoteCreateInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
namespace Buckaroo\Magento2\Api;

use Buckaroo\Magento2\Api\Data\PaypalExpress\ShippingAddressRequestInterface;
use Buckaroo\Magento2\Api\Data\QuoteCreateResponseInterface;

interface PaypalExpressQuoteCreateInterface
{
Expand All @@ -32,7 +31,7 @@ interface PaypalExpressQuoteCreateInterface
* @param \Buckaroo\Magento2\Api\Data\PaypalExpress\ShippingAddressRequestInterface $shipping_address
* @param string $page
* @param string|null $order_data
* @return QuoteCreateResponseInterface
* @return \Buckaroo\Magento2\Api\Data\QuoteCreateResponseInterface
*/
public function execute(
ShippingAddressRequestInterface $shipping_address,
Expand Down
41 changes: 9 additions & 32 deletions Block/Catalog/Product/View/Applepay.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,52 +60,29 @@ public function __construct(
/**
* @return bool
*/
public function canShowButton()
public function canShowButton($page)
{
$result = false;

if ($this->cart->getSummaryQty()
&&
($this->applepayConfigProvider->getActive() != 0)
&&
($this->applepayConfigProvider->getAvailableButtons())
&&
(in_array('Cart', $this->applepayConfigProvider->getAvailableButtons()))
) {
$result = true;
}

return $result;
return $this->isModuleActive() &&
in_array($page, $this->applepayConfigProvider->getAvailableButtons()) &&
$this->applepayConfigProvider->isApplePayEnabled($this->_storeManager->getStore());
}

/**
* Check if Buckaroo module is active
*
* @return bool
*/
public function canShowProductButton()
public function isModuleActive()
{
$result = false;

if (($this->applepayConfigProvider->getActive() != 0)
&&
($this->applepayConfigProvider->getAvailableButtons())
&&
(in_array('Product', $this->applepayConfigProvider->getAvailableButtons()))
) {
$result = true;
}

return $result;
$status = $this->applepayConfigProvider->getActive();
return $status == 1 || $status == 2;
}

/**
* @return false|string
*/
public function getCheckoutConfig()
{
if (!$this->canShowButton()) {
return null;
}

return json_encode($this->compositeConfigProvider->getConfig(), JSON_HEX_TAG);
}

Expand Down
42 changes: 5 additions & 37 deletions Block/Catalog/Product/View/IdealFastCheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,31 +69,12 @@ public function __construct(
*
* @return bool
*/
public function canShowProductButton()
public function canShowButton($page)
{
if ($this->isModuleActive() && $this->isButtonEnabled()){
return $this->idealConfig->canShowButtonForPage(
'Product',
$this->_storeManager->getStore()
);
}
return false;
}

/**
* Determine if the cart button can be shown
*
* @return bool
*/
public function canShowCartButton()
{
if ($this->isModuleActive() && $this->isButtonEnabled()){
return $this->idealConfig->canShowButtonForPage(
'Cart',
$this->_storeManager->getStore()
);
}
return false;
return ($this->isModuleActive() &&
$this->idealConfig->isFastCheckoutEnabled($this->_storeManager->getStore()) &&
$this->idealConfig->canShowButtonForPage($page, $this->_storeManager->getStore()) &&
$this->idealConfig->isIDealEnabled($this->_storeManager->getStore()));
}

/**
Expand All @@ -107,19 +88,6 @@ public function isModuleActive()
return $status == 1 || $status == 2;
}

/**
* Check if ideal fast checkout button is enabled
*
* @return mixed
*/
public function isButtonEnabled()
{
return $this->idealConfig->isFastCheckoutEnabled(
$this->_storeManager->getStore()
);
}


/**
* Get logo based on chosen color setting
*
Expand Down
24 changes: 5 additions & 19 deletions Block/Catalog/Product/View/PaypalExpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,11 @@ public function __construct(
$this->encryptor = $encryptor;
$this->paypalConfig = $paypalConfig;
}
public function canShowProductButton()
public function canShowButton($page)
{
if ($this->isModuleActive()){
return $this->paypalConfig->canShowButtonForPage(
'Product',
$this->_storeManager->getStore()
);
}
return false;
}

public function canShowCartButton()
{
if ($this->isModuleActive()){
return $this->paypalConfig->canShowButtonForPage(
'Cart',
$this->_storeManager->getStore()
);
}
return false;
return $this->isModuleActive() &&
$this->paypalConfig->canShowButtonForPage($page, $this->_storeManager->getStore()) &&
$this->paypalConfig->isPayPalEnabled($this->_storeManager->getStore());
}

/**
Expand All @@ -88,6 +73,7 @@ public function isModuleActive()
$status = $this->configProviderAccount->getActive();
return $status == 1 || $status == 2;
}

/**
* Get all data required
*
Expand Down
1 change: 0 additions & 1 deletion Block/Widget/Button/Toolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class Toolbar
'buckaroo_magento2_belfius',
'buckaroo_magento2_transfer',
'buckaroo_magento2_eps',
'buckaroo_magento2_giropay',
'buckaroo_magento2_kbc',
'buckaroo_magento2_klarna',
'buckaroo_magento2_klarnakp',
Expand Down
13 changes: 8 additions & 5 deletions Controller/Redirect/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,16 @@ private function redirectProcess() {
|| $paymentMethod->getConfigData('order_email', $store) === "1"
)
) {
if (!($this->hasPostData('add_initiated_by_magento', 1) &&
$this->hasPostData('brq_primary_service', 'KlarnaKp') &&
$this->hasPostData('add_service_action_from_magento', 'reserve') &&
!empty($this->response['brq_service_klarnakp_reservationnumber'])
if (!(
($this->hasPostData('add_initiated_by_magento', 1) &&
$this->hasPostData('brq_primary_service', 'KlarnaKp') &&
$this->hasPostData('add_service_action_from_magento', 'reserve') &&
!empty($this->response['brq_service_klarnakp_reservationnumber']))
||
$this->hasPostData('add_service_action_from_magento', 'payfastcheckout')
)) {
if ($statusCode == $this->helper->getStatusCode('BUCKAROO_MAGENTO2_STATUSCODE_SUCCESS')) {
$this->logger->addDebug(__METHOD__ . '|sendemail|');
$this->logger->addDebug(__METHOD__ . '|sendemail| |1|');
$this->orderSender->send($this->order, true);
}
}
Expand Down
3 changes: 1 addition & 2 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function areEqualAmounts($amount1, $amount2)
if ($amount2 == 0) {
return $amount1 == $amount2;
} else {
return abs((floatval($amount1) - floatval($amount2)) / floatval($amount2)) < 0.00001;
return abs((floatval($amount1) - floatval($amount2)) / floatval($amount2)) <= 0.01;
}
}

Expand Down Expand Up @@ -433,7 +433,6 @@ public function getPaymentMethodsList()
['value' => 'emandate', 'label' => __('Digital Debit Authorization')],
['value' => 'eps', 'label' => __('EPS')],
['value' => 'giftcards', 'label' => __('Giftcards')],
['value' => 'giropay', 'label' => __('Giropay')],
['value' => 'ideal', 'label' => __('iDEAL')],
['value' => 'idealprocessing', 'label' => __('iDEAL Processing')],
['value' => 'kbc', 'label' => __('KBC')],
Expand Down
1 change: 0 additions & 1 deletion Model/Config/Source/PaymentMethods/AfterExpiry.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public function toOptionArray()
['value' => 'dankort', 'label' => __('Dankort')],
['value' => 'eps', 'label' => __('EPS')],
['value' => 'giftcard', 'label' => __('Giftcards')],
['value' => 'giropay', 'label' => __('Giropay')],
['value' => 'ideal', 'label' => __('iDEAL')],
['value' => 'idealprocessing', 'label' => __('iDEAL Processing')],
['value' => 'maestro', 'label' => __('Maestro')],
Expand Down
1 change: 0 additions & 1 deletion Model/Config/Source/PaymentMethods/PayLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function toOptionArray()
['value' => 'dankort', 'label' => __('Dankort')],
['value' => 'eps', 'label' => __('EPS')],
['value' => 'giftcard', 'label' => __('Giftcards')],
['value' => 'giropay', 'label' => __('Giropay')],
['value' => 'ideal', 'label' => __('iDEAL')],
['value' => 'idealprocessing', 'label' => __('iDEAL Processing')],
['value' => 'maestro', 'label' => __('Maestro')],
Expand Down
5 changes: 0 additions & 5 deletions Model/Config/Source/PaymentMethods/PayPerEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ public function toOptionArray()
'label' => __('Giftcards'),
'code' => 'buckaroo_magento2_giftcards'
],
[
'value' => 'giropay',
'label' => __('Giropay'),
'code' => 'buckaroo_magento2_giropay'
],
[
'value' => 'ideal',
'label' => __('iDEAL'),
Expand Down
4 changes: 4 additions & 0 deletions Model/ConfigProvider/Method/Applepay.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,8 @@ public function getBaseAllowedCurrencies()
];
}

public function isApplePayEnabled($store = null)
{
return $this->getConfigFromXpath(self::XPATH_APPLEPAY_ACTIVE, $store);
}
}
81 changes: 0 additions & 81 deletions Model/ConfigProvider/Method/Giropay.php

This file was deleted.

Loading
Loading