buckaroo-it / magento2 Goto Github PK
View Code? Open in Web Editor NEWRepository containing the Magento2 plugin by Buckaroo
License: MIT License
Repository containing the Magento2 plugin by Buckaroo
License: MIT License
Hi,
It seems that after upgrading to the latest RC for Magento 2.3.5 the checkout agreements aren't displayed and therefor checkout is not possible.
This only seems to occur when using the inline handler. Which became the default because you did not provide an upgrade path when you switched from yesno.
Magento version: 2.3.5
Buckaroo version: 1.25-rc
Checkout: Onestepcheckout.com
The telephone field is not required at the shop for customers. So there is no field for the customer with telephone number. The Buckaroo module checks if the customer has a telephone number. If there is no number the module will add a field on the payment method. But this is not working for us. We changed the follow file to make this work.
With this;
return telephone != '' && telephone != '-' && telephone != null;
Hi, when I create an order that is fully paid with Fashion Cheque, I can't create a creditmemo with online refund for it. The button 'Credit Memo' is not visible on the invoice page. On the order page itself it is visible but that creates an offline refund.
When upgrading magento to 2.3.4 (Commerce) I ran into the issue that this package is not compatible yet.
The issue is that magento/framework:102.0.4
is not allowed as a requirement.
Could you please verify that 102.0.4 can safely be added in the package's allowed requirements?
We have the Buckaroo Magento2 module running on v1.21.0 with Magento2 running on v2.3.4. In the Buckaroo configuration (Store > Configuration > Sales > Payment Methods > Other Payment Methods > Buckaroo) we have the following setup:
Creditcards: {
Enable Creditcards: Test,
Allowed Creditcards: {
American Express,
Maestro,
Mastercard
}
}
In the checkout of our webshop, all creditcards are shown, even the creditcards that we didn't allow. Checking creditcard.js:67
file shows the following this.creditcards = ko.observableArray(window.checkoutConfig.payment.buckaroo.creditcard.cards);
. The creditcards are not filtered on their active attribute, but are just shown.
Filter the creditcards by their active attribute before observing them. Doing this makes sure only the active creditcards are shown in the frontend of the checkout.
Hi,
We're experiencing issues when trying to pay for an order in the checkout (last step). After investigating the error log, we found the following message:
[2020-02-10 09:33:00] main.CRITICAL: SOAP-ERROR: Encoding: Violation of encoding rules {"exception":"[object] (SoapFault(code: 0): SOAP-ERROR: Encoding: Violation of encoding rules at xxxx/vendor/buckaroo/magento2/Soap/Client/SoapClientWSSEC.php:33)"} []
Previously the payments worked just fine, but since we've upgraded Magento from 2.3.3 to 2.3.4 this issue started to appear. Currently we have the latest Buckaroo module version installed (1.17.0). We also confirmed whether the settings in the admin have the correct values. The store is running in test mode.
Any help is appreciated, this issue is currently blocking our Magento upgrades.
The applepay block and template that are used on the productpage ads window.checkoutconfig and fills it with custom config without loading the entire checkoutconfig.
This interferes with other modules that check and rely on window.checkoutconfig (such ass Swissup Firecheckout) and can lead to JS errors that break the page.
this can not be prevented by turning off applepay, because the script is loaded even if applepay is turned off (which a simple check could prevent)
Magento version: 2.3.5
Buckaroo version: 1.25-rc
Steps;
Now you see there is not invoice created. In the order comments there is a error message:
Exception message: Cannot do a Buckaroo transaction when 'mode' is not set or set to 0.
This error can be found in the PHP error log.
[2020-08-09 08:53:49] main.CRITICAL: Cannot do a Buckaroo transaction when 'mode' is not set or set to 0. {"exception":"[object] (LogicException(code: 0): Cannot do a Buckaroo transaction when 'mode' is not set or set to 0. at /home/username/releases/20200803134031/vendor/buckaroo/magento2/Gateway/Http/Bpe3.php:166)"} []
When Buckaroo push the data after a successful checkout there is a error in the Magento logs;
[2020-07-30 07:06:36] main.CRITICAL: Report ID: webapi-5f22717c3684d; Message: Notice: Undefined index: brq_transactions in /home/xxx/releases/20200729072923/vendor/buckaroo/magento2/Model/Push.php on line 1193 {"exception":"[object] (Exception(code: 0): Report ID: webapi-5f22717c3684d; Message: Notice: Undefined index: brq_transactions in /home/xxx/releases/20200729072923/vendor/buckaroo/magento2/Model/Push.php on line 1193 at /home/xxx/releases/20200729072923/vendor/magento/framework/Webapi/ErrorProcessor.php:208, Exception(code: 0): Notice: Undefined index: brq_transactions in /home/xxx/releases/20200729072923/vendor/buckaroo/magento2/Model/Push.php on line 1193 at /home/xxx/releases/20200729072923/vendor/magento/framework/App/ErrorHandler.php:61)"} []
There is a check if a transactions is a grouptransactionPart in this code
private function isGroupTransactionPart()
{
return $this->groupTransaction->getGroupTransactionByTrxId($this->originalPostData['brq_transactions']);
}
But in our case Buckaroo push doesn't contain brq_transactions and it will generate a PHP error and the response is not processed.
This is the response from buckaroo
[30-Jul-2020 07:12:20 UTC] Array
(
[ADD_initiated_by_magento] => 1
[ADD_service_action_from_magento] => reserve
[brq_datarequest] => *****************
[brq_datarequest_] => *****************
[brq_invoicenumber] => *****************
[brq_primary_service] => KlarnaKp
[brq_SERVICE_klarnakp_ReservationNumber] => *****************
[brq_statuscode] => 190
[brq_statuscode_detail] => S990
[brq_statusmessage] => The request was successful.
[brq_test] => true
[brq_timestamp] => 2020-07-30 09:12:20
[brq_websitekey] => *****************
[brq_signature] => *****************
)
We have a setup of Magento running on Nginx, which is behind varnish cache. Since varnish cache will act as a proxy to Nginx it will register the IP address of the server as the IP address which has placed the order. The real IP address of the customer is forward and stored in Magento as "X-Forwarded-For".
The module gets the IP address from the order with $order->getIpAddress()
this will always return the IP address of the server and not of the client.
Check of there's a value stored in $order->getXForwardedFor()
first and send that value as IP address to Buckaroo when it's available. It stores the real client IP address. If no value is present fallback to the IP address stored in the order.
Hi, I have submitted 3 issues around giftcards within the last 30 minutes at least 1 could have been prevented if sufficient functional tests were available.
The absence of functional tests are a bit disturbing for a module which takes on such a vital role in the checkout process.
Is this part of code quality on your future roadmap?
Hi,
I'm working on a Magento upgrade, I'm wondering when the Buckaroo plugin will be supporting Magento 2.3.5? Magento released it, but the Magento framework dependencies in the Buckaroo module are preventing me from upgrading to 2.3.5.
thanks in advance!
In the Setup/UpgradeData.php, there are a number of order statuses that are being inserted into Magento.
One of them is buckaroo_magento2_pending_payment
The problem with this is that the maximum length of the status field is 32 characters. The status buckaroo_magento2_pending_payment
has a length of 33 characters.
This should be replaced with an order status with a maximum of 32 characters.
Could you please investigate this?
Hi,
There's a unclosed div in
https://github.com/buckaroo-it/Magento2/blob/master/view/frontend/web/template/payment/buckaroo_magento2_giftcards.html#L130
which may break possible layout.
Cannot use the extension at the moment for a .fr domain.
Magento 2.3.4
PHP 7.3
[2020-05-26 08:46:31] main.CRITICAL: SOAP-ERROR: Encoding: string '\xf7...' is not a valid utf-8 string {"exception":"[object] (SoapFault(code: 0): SOAP-ERROR: Encoding: string '\xf7...' is not a valid utf-8 string at /var/domains/x/vendor/buckaroo/magento2/Soap/Client/SoapClientWSSEC.php:42)"} []
$result = [parent::__soapCall($function_name,$arguments,$options,$input_headers,$output_headers)];
file_put_contents('log_this.log',
$function_name . PHP_EOL .
print_r($arguments,true) . PHP_EOL .
print_r($options,true) . PHP_EOL .
print_r($input_headers,true) . PHP_EOL .
print_r($output_headers,true) . PHP_EOL
,FILE_APPEND);
$result = [parent::__soapCall($function_name,$arguments,$options,$input_headers,$output_headers)];
There is no 'weird' character as you can see.
log_this.log
TransactionRequest
Array
(
[0] => Array
(
[Currency] => EUR
[AmountDebit] => 65.58
[AmountCredit] => 0
[Invoice] => 4000004783
[Order] => 4000004783
[Description] => TracPartz
[ClientIP] => stdClass Object
(
[_] => 162.158.159.62
[Type] => IPv4
)
[ReturnURL] => https://www.x.fr/buckaroo/redirect/process/?form_key=sI6fQ5LTQjksuDVT
[ReturnURLCancel] => https://www.x.fr/buckaroo/redirect/process/?form_key=sI6fQ5LTQjksuDVT
[ReturnURLError] => https://www.x.fr/buckaroo/redirect/process/?form_key=sI6fQ5LTQjksuDVT
[ReturnURLReject] => https://www.x.fr/buckaroo/redirect/process/?form_key=sI6fQ5LTQjksuDVT
[OriginalTransactionKey] =>
[StartRecurrent] =>
[PushURL] => https://www.x.fr/rest/V1/buckaroo/push
[Services] => stdClass Object
(
[Service] => Array
(
[Name] => maestro
[Action] => Pay
[Version] => 1
)
)
[AdditionalParameters] => stdClass Object
(
[AdditionalParameter] => Array
(
[0] => Array
(
[_] => pay
[Name] => service_action_from_magento
)
[1] => Array
(
[_] => 1
[Name] => initiated_by_magento
)
)
)
)
)
Is it possible to not refund transactioncost for orders where you only refund a partial order?
[2020-06-08 14:23:47] report.CRITICAL: Notice: Undefined index: card in {path}/vendor/buckaroo/magento2/Controller/Checkout/Giftcard.php on line 222
This occurs when giftcards are configured "inline". The customer attempts to pay but is unable to.
Temporary workaround: set GiftCard handling mode to redirect at store / configuration / sales / payment methods / configure buckaroo / giftcards / GiftCard handling
Environment:
PHP version 7.2.22
Magento version 2.3.5-P1 Commerce
When trying to update Buckaroo to 1.17.0 and Magento 2.2.11 with Composer, the update is blocked because Buckaroo requires magento/framework 101.0.10 or lower. Magento 2.2.11 requires version 101.0.11 of magento/framework and therefore cannot be installed with version 1.17.0 of Buckaroo.
Although the release notes state that 1.17.0 is tested with Magento 2.2.11, it cannot be installed.
I created this ticket for the sole purpose of keeping track of when support for Magento 2.4 / 2.3.5-p2 will be available and hopefully also what is happening / what progress is being made in the meantime.
Hi
I overviewed this extension related to conflicts on checkout and wondering if this extension is open for comments ?
Every giftcard now get's this class:
v1.23.0-RC1...v1.23.2-RC1#diff-d92ae7a6b11831b13cac8a6bd7f531bbR57
But ajax is also a soccer team and provides a giftcard, shouldn't this classname be generic?
Hello,
We are using the module version 1.24.0 with Magento Commerce 2.3.3 with a multistore setup. We are currently experiencing two issues with PayPal with this module.
Hello,
After updating to version 1.23.2, our magento 2.3.4 installation started throwing an SQL error in the backend on the orders screen.
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'O18' in 'where clause', query was: select method, group_concat(distinct(buckaroo_magento2_group_transaction.servicecode) SEPARATOR "-") as giftcard_codes, increment_id from sales_order_payment inner join sales_order on sales_order.entity_id = sales_order_payment.parent_id inner join buckaroo_magento2_group_transaction on buckaroo_magento2_group_transaction.order_id=sales_order.increment_id where sales_order.increment_id in (O18-0053366, ... omitted ) group by sales_order.increment_id
After investigating some more I found out that there was an update to this file.
view/adminhtml/ui_component/sales_order_grid.xml
(removing the file loads the grid correctly).
And this file
Ui/Component/Listing/Column/Method/Filter.php
does something with:
/**
* Get options
*
* @return array
*/
public function toOptionArray()
{
parent::toOptionArray();
$db = $this->resourceConnection->getConnection();
$result = $db->query('
select
method,
group_concat(distinct(buckaroo_magento2_giftcard.servicecode) SEPARATOR "-") as giftcard_codes,
group_concat(distinct(buckaroo_magento2_giftcard.label) SEPARATOR "-") as giftcard_titles
from sales_order_payment
inner join sales_order on sales_order.entity_id = sales_order_payment.parent_id
inner join buckaroo_magento2_group_transaction on buckaroo_magento2_group_transaction.order_id=sales_order.increment_id
inner join buckaroo_magento2_giftcard on buckaroo_magento2_giftcard.servicecode=buckaroo_magento2_group_transaction.servicecode
group by buckaroo_magento2_group_transaction.order_id
');
...
Which kinda looks as to where the SQL error is coming from.
Hope this is enough information to help you debug/reproduce the issue.
Thank you in advance.
See my comment on the commit 348d153#r44915440
Some code was refactored to simplify shipping cost incl or excl tax. But not the shippingcost or only send incltax when the store configuration setting is set to excl tax.
https://github.com/buckaroo-it/Magento2/blob/v1.29.0/Model/Method/Afterpay.php#L950 (line 950)
Hey,
I cannot install the module through packagist. Could you solve this for me?
Error when installing:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing tig/buckaroo (v1.14.1): Downloading (failed) Failed to download tig/buckaroo from dist: The "https://api.github.com/repos/tig-nl/buckaroo-magento2/zipball/e78ad1109f6427d00d9d26e0dec954d45d214ad5" file could not be downloaded (HTTP/1.1 404 Not Found)
Now trying to download from source
- Installing tig/buckaroo (v1.14.1): Cloning e78ad1109f
Installation failed, reverting ./composer.json to its original content.
[RuntimeException]
Failed to clone https://github.com/tig-nl/buckaroo-magento2.git via https, ssh protocols, aborting.
- https://github.com/tig-nl/buckaroo-magento2.git
Cloning into '/var/www/html/example/vendor/tig/buckaroo'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/tig-nl/buckaroo-magento2.git/'
- [email protected]:tig-nl/buckaroo-magento2.git
Cloning into '/var/www/html/example/vendor/tig/buckaroo'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Whenever i try to make an payment using iDeal/Mastercard on a live account i get a invalid form key error when being redirected to the succes page. Does anyone else experience this problem? I cant seem to reproduce it with test credentials.
The following javascript occurs in the browser console on the "checkout/cart" page when Apple Pay is enabled as payment method. The Apple Pay button is not shown to the users.
Uncaught ReferenceError: Unable to process binding "afterRender: function(){return showPayButton }"
Message: showPayButton is not defined
at afterRender (eval at createBindingsStringEvaluator (knockout.js:2982), :3:64)
at init (after-render.js:17)
at knockout.js:3358
at Object.ignore (knockout.js:1470)
at knockout.js:3357
at Object.arrayForEach (knockout.js:159)
at applyBindingsToNodeInternal (knockout.js:3343)
at applyBindingsToNodeAndDescendantsInternal (knockout.js:3223)
at applyBindingsToDescendantsInternal (knockout.js:3205)
at applyBindingsToNodeAndDescendantsInternal (knockout.js:3232)
How to reproduce
Tested on Magento v2.3.4 commerce.
Magento 2.3.4
PHP 7.3
buckaroo/magento2 1.23.2
Upgrade from:
Magento 2.1.x
PHP 7.0
tig/buckaroo v1.9.1
After the upgrade the logs report many errors like below:
main.CRITICAL: Report ID: webapi-5ecf530080a8e; Message: Notice: Undefined index: brq_transaction_type in /x/vendor/buckaroo/magento2/Model/Push.php on line 1101 {"exception":"[object] (Exception(code: 0): Report ID: webapi-5ecf530080a8e; Message: Notice: Undefined index: brq_transaction_type in /x/vendor/buckaroo/magento2/Model/Push.php on line 1101 at /x/vendor/magento/framework/Webapi/ErrorProcessor.php:208, Exception(code: 0): Notice: Undefined index: brq_transaction_type in /x/vendor/buckaroo/magento2/Model/Push.php on line 1101 at /x/vendor/magento/framework/App/ErrorHandler.php:61)"} []
buckaroo/magento2 v1.26.0 requires magento/framework >=100.1.0,<=100.1.18|>=101.0.0,<=101.0.11|>=102.0.0,<=102.0.5-p2|102.0.2-p2|>=103.0.0 -> satisfiable by magento/framework[102.0.5-p2, 103.0.1, 103.0.0-p1, 103.0.0, 102.0.4-p2, 102.0.5, 102.0.4-p1, 102.0.3-p1, 102.0.4, 101.0.11, 102.0.2-p2, 101.0.10, 102.0.3, 101.0.9, 100.1.18, 102.0.2, 101.0.8, 102.0.1, 100.1.17, 102.0.0, 101.0.7, 100.1.16, 101.0.6, 100.1.15, 100.1.14, 101.0.5, 101.0.4, 100.1.13, 101.0.3, 100.1.12, 101.0.2, 100.1.11, 100.1.10, 101.0.1, 101.0.0, 100.1.9, 100.1.8, 100.1.7, 100.1.6, 100.1.5, 100.1.4, 100.1.3, 100.1.2, 100.1.1, 100.1.0].
- magento/product-community-edition 2.3.6 requires magento/framework 102.0.6 -> satisfiable by magento/framework[102.0.6].
- magento/product-enterprise-edition 2.3.6 requires magento/product-community-edition 2.3.6 -> satisfiable by magento/product-community-edition[2.3.6].
- Installation request for magento/product-enterprise-edition 2.3.6 -> satisfiable by magento/product-enterprise-edition[2.3.6].
I think this just about sums it up, when can we expect the module to be compatible with 102.0.6?
After upgrading to buckaroo/magento2 1.23.1 the checkout is broken. Downgrading back to 1.16.1 solved it, but I need to upgrade to Magento 2.3.5 as soon as possible so using V16.1 is not an option.
Conditions:
PHP 7.2.24
Magento 2.3.4 enterprise
developer mode
I've heard colleagues about the same error on 2.2.X
Request URL: http://REDACTED.test/nl/checkout/
Request Method: GET
Status Code: 200 OK
Remote Address: 127.0.0.1:80
Referrer Policy: no-referrer-when-downgrade
Response:
<script type="text/x-magento-init"> { "#checkout": { "Magento_Ui/js/core/app":We recently had an issue with a client shop where they could not use the afterpay payment option.
Magento throws an error saying the total amount does not match the sum of the product prices. This is caused in:
/**
* @param \Magento\Quote\Model\Quote\Item $productItem
* @param $includesTax
*
* @return mixed
*/
public function calculateProductPrice($productItem, $includesTax)
{
if ($includesTax) {
$productPrice = $productItem->getRowTotalInclTax();
} else {
$productPrice = $productItem->getRowTotal();
}
return $productPrice;
}
The product price is currently calculated from 2 possible fields:
row_total_inc_tax
or row_total
What is being forgotten here is that Home Copy Levy amount is stored in
weee_tax_applied_row_amount
So when there is a Home Copy Levy amount stored in that field, the totals do not match anymore since they haven't been added to the product price.
I managed to make a patch that adds the correct amount when needed in the same method, and that seemed to work.
/**
* @param \Magento\Quote\Model\Quote\Item $productItem
* @param $includesTax
*
* @return mixed
*/
public function calculateProductPrice($productItem, $includesTax)
{
if ($includesTax) {
$productPrice = $productItem->getRowTotalInclTax();
} else {
$productPrice = $productItem->getRowTotal();
}
if ($productItem->getWeeeTaxAppliedRowAmount() > 0) {
$productPrice += $productItem->getWeeeTaxAppliedRowAmount();
}
return $productPrice;
}
We tested this in a new shop to see if it still occured and it did, some specifications:
PHP 7.2.24 (cli) ( ZTS )
mysql 8.0.17
nginx/1.14.0
When there are multiple stores that can use the same increment_id setup (e.g. a EN storeview and a NL storeview)
Its possible to setup the increment ids to be in the same range (e.g. 10000001 for EN and 10000001 for NL)
If this is done and some orders are placed in the default store view, than the next increment id on the other store view will generate an error on the ->getPayment() in Controller/Redirect/Process.php
on line 143.
But basically it loads the incorrect order in this process.
A solution to this would be to exclusively load by using the transaction id. Or sent the payment_id with the order to properly load the correct order and payment.
Mobile phone number is not a default magento checkout field, but afterpay seems to require it as it either shows this error:
or returns to an empty checkout/cart.
Both are weird, because mobile phone number isn't a checkout field in Magento.
Environment:
PHP 7.3, Magento 2.3.5-P2, Buckaroo 1.25 pre-release.
Error logs: empty.
We are running a couple of magento application servers behind an SSL offloading loadbalancer.
This means magento is only receiving HTTP:// requests.
The problem is that you r lates fix tries to set a SameSite cookie which apparently needs the secure bit to be set.
This secure bit isn't set automatically when not running on HTTPS so it has to be explicitly set.
I have already created a Pull request with a fix for it:
#57
This is a small part of the stacktrace:
"0":"Cookie must be secure in order to use the SameSite None directive.","1":"#1 BuckarooMagento2ModelPluginFixSession->beforeSetPublicCookie() called at [vendor/magento/framework/Interception/Interceptor.php:121]
#2 MagentoFrameworkStdlibCookiePhpCookieManagerInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
Hi Buckaroo,
When placing an order, go to the payment screens in Buckaroo and redirected back, the customer session is lost.
We have the issue with Magento 2.4.1 and it exactly looks like the problem as described here https://support.magento.com/hc/en-us/articles/360049032952-Customers-get-logged-out-or-lose-cart-content-on-Magento-storefront
We checked with your latest version (1.26.0). Can you check if you set the cookies correct?
Thanks,
Peter
Setup/InstallSchema.php
$installer->getConnection()->query( "UPDATE core_config_data SET path = replace(path, 'tig_buckaroo','buckaroo_magento2') WHERE path LIKE '%tig_buckaroo%';" );
We have a client that adds a free product to the shopping cart. The price for this product is zero. When the customer wants to place a order with Klarna we get a validation error. I did some debugging. When the price is zero with no tax percent the module sends an empty request for that article. See request below for GroupID 4. Thats the free product.
[43] => Array
(
[_] =>
[Group] => Article
[GroupID] => 4
[Name] => ArticlePrice
)
[44] => Array
(
[_] => 1
[Group] => Article
[GroupID] => 4
[Name] => ArticleQuantity
)
[45] => Array
(
[_] =>
[Group] => Article
[GroupID] => 4
[Name] => ArticleVat
)
[46] => Array
(
[_] => 2
[Group] => Article
[GroupID] => 5
[Name] => ArticleNumber
)
[47] => Array
(
[_] => 4.89
[Group] => Article
[GroupID] => 5
[Name] => ArticlePrice
)
For now we changed the code on this lines. I don't know if its good but it's working on our side for now.
https://github.com/buckaroo-it/Magento2/blob/master/Model/Method/Klarnakp.php#L953
with '_' => $item->getTaxPercent() ?? 0,
and
https://github.com/buckaroo-it/Magento2/blob/master/Model/Method/Klarnakp.php#L1008
with
public function calculateProductPrice($productItem, $includesTax)
{
if ($includesTax) {
$productPrice = $productItem->getRowTotalInclTax() ?? 0;
} else {
$productPrice = $productItem->getRowTotal() ?? 0;
}
return $productPrice;
}
Hi,
I'm on 1.17.0. The option for showNLBEFields
seems to break the input the phone field.
On every change event the input loses focus, which is quite annoying for a user during checkout. This behaviour is currently not in the old afterpay/afterpay2 methods.
I removed the knockout <!-- ko if: showNLBEFields -->
code in the template file, which seems to fix the issue, but is not the real solution for this problem.
When updating to the version 1.16.0 we experience an error when loading the configuration
We get this error when in production mode and after deploying the new version to our acceptance environment:
[17-Jan-2020 11:54:59 UTC] PHP Fatal error: Uncaught Error: Cannot instantiate interface Buckaroo\Magento2\Api\CertificateRepositoryInterface in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116
Stack trace:
#0 vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Buckaroo\Magent...', Array)
#1 vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Buckaroo\Magent...')
#2 vendor/magento/framework/ObjectManager/Factory in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116
Hello,
Currently I am investigating an issue we have in one of our shops. The issue is that the buckaroo fee for transactions was not displayed inclusive tax. But I believe the exact issue is not relevant because the cause is much deeper than this.
I have tracked this down to the AbstractConfigProvider::__call
method. What this method does is dynamically create a string which should be a constant in the class that implements AbstractConfigProvider
and then pass it into $this->getConfigFromXpath(constant($constant), $store);
This however is not possible, because of Magento creating Interceptor
classes for all classes, this is to enable the plugin system.
The string that is created for example XPATH_BUCKAROOFEE_PRICE_DISPLAY_CART
should be static::XPATH_BUCKAROOFEE_PRICE_DISPLAY_CART
but instead is static::XPATH_INTERCEPTOR_PRICE_DISPLAY_CART
This is a fundamental problem with all config providers. My suggestion is get rid of the AbstractConfigProvider::__call
all together and implement the methods defined above the implementing classes instead of relying on magic.
class BuckarooFee extends AbstractConfigProvider
{
...
public function getPriceDisplayCart(?Store $store): int
{
return $this->getConfigFromXpath(self::XPATH_BUCKAROOFEE_PRICE_DISPLAY_CART, $store);
}
...
}
I will solve my issue in a template for now.
When Klarna denied an order there is an error in the code: https://github.com/buckaroo-it/Magento2/blob/master/Observer/HandleFailedQuoteOrder.php#L64
[28-Jul-2020 14:41:35 UTC] PHP Fatal error: Uncaught Error: Call to undefined method Buckaroo\Magento2\Model\Plugin\Method\Klarnakp::save() in /Users/username/Sites/client/vendor/buckaroo/magento2/Observer/HandleFailedQuoteOrder.php:65
Stack trace:
#0 /Users/username/Sites/client/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Buckaroo\Magento2\Observer\HandleFailedQuoteOrder->execute(Object(Magento\Framework\Event\Observer))
#1 /Users/username/Sites/client/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Buckaroo\Magento2\Observer\HandleFailedQuoteOrder), Object(Magento\Framework\Event\Observer))
#2 /Users/username/Sites/client/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#3 /Users/username/Sites/client/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('sales_model_ser...', Array)
#4 /Users/username/Sites/client/vendor in /Users/username/Sites/client/vendor/buckaroo/magento2/Observer/HandleFailedQuoteOrder.php on line 65
We changed it to the following code and then itβs working fine. The order is being canceled and saved.
$order->cancel();
$order->save();
Can you also add the error message from Buckaroo/Klarna as a comment to the order with $order->addStatusHistoryComment()
so the shop owner can see what the reason is for the canceled order.
Loading the cart results in a fatal error: Cannot instantiate abstract class Magento\Framework\Model\ResourceModel\AbstractResource
You cannot add non-optional constructor arguments after the optional arguments:
Magento2/Model/Method/Giftcards.php
Line 122 in 40528e1
Issue:
The 'Configure' button onder Sales > Payment Methods is disabled. When Magento_Paypal module is enabled, the configure button is enabled as well. Although the module isn't set as a dependency.
Possible fix:
Replace isPaymentEnabled($element)
function in Block\Adminhtml\System\Config\Fieldset\Payment.php by a function checking wether Buckaroo module is activated, so the configure button is activated whenever the module is activated. Also add a script so the button isn't accidentally getting activated by the Paypal module.
The ApplePay module on the product page has a dependency on Magento_Checkout/js/model/quote
. This model however needs the window.checkoutConfig object to be filled. The error on the product page is as follow:
totals.js:16 Uncaught TypeError: Cannot read property 'items' of undefined at totals.js:16 at Object.execCb (require.js:1650) at Object.context.execCb (resolver.js:145) at Module.check (require.js:866) at Module.enable (require.js:1143) at Module.init (require.js:774) at callGetModule (require.js:1170) at Object.completeLoad (require.js:1544) at HTMLScriptElement.onScriptLoad (require.js:1671)
The problem lies in the Magento_Checkout/js/model/quote
file on line 37 and 38
totalsData = proceedTotalsData(window.checkoutConfig.totalsData), totals = ko.observable(totalsData),
When these variables are not set, the Magento_Checkout/js/model/totals
file crashes on line 16 var quoteItems = ko.observable(quote.totals().items),
because quote.totals()
is undefined (empty still) because the window.checkoutConfig.totalsData is not set on product pages...
A quick fix for now is to remove the "buckaroo_magento2.product.info.applepay" block from the product page until the dependency issue is fixed.
Buckaroo version v1.15.0 added support for amasty gift cards. This works great when placing orders, however when creating a credit memo we get the error
This is due to the grand total excluding gift card value being send as reference value, which is then compared to the grand total on the order in magento which is including gift card value
I had a look at what is send to the gateway, and it's something like this
["Currency"]=> string(3) "EUR"
["AmountDebit"]=> int(0)
["AmountCredit"]=> float(34.99)
["Invoice"]=> string(13) "302029436"
["Order"]=> string(13) "302029436"
["Services"]=> object(stdClass)#7933 (1) {
["Service"]=> array(4) {
["Name"]=> string(18) "afterpaydigiaccept"
["Action"]=> string(6) "Refund"
["Version"]=> int(1)
["RequestParameter"]=> array(6) {
[0]=> array(3) {
["_"]=> string(15) "1 x product_name"
["Name"]=> string(18) "ArticleDescription"
["GroupID"]=> int(1)
}
[1]=> array(3) {
["_"]=> string(5) "26931"
["Name"]=> string(9) "ArticleId"
["GroupID"]=> int(1)
}
[2]=> array(3) {
["_"]=> int(1)
["Name"]=> string(15) "ArticleQuantity"
["GroupID"]=> int(1)
}
[3]=> array(3) { ["_"]=> float(40) ["Name"]=> string(16) "ArticleUnitPrice" ["GroupID"]=> int(1) }
[4]=> array(3) { ["_"]=> int(1) ["Name"]=> string(18) "ArticleVatCategory" ["GroupID"]=> int(1) }
[5]=> array(2) { ["_"]=> float(4.99) ["Name"]=> string(13) "ShippingCosts" }
}
}
}
["AdditionalParameters"]=> object(stdClass)#7935 (1) {
["AdditionalParameter"]=> array(2) {
[0]=> array(2) { ["_"]=> string(6) "refund" ["Name"]=> string(27) "service_action_from_magento" }
[1]=> array(2) { ["_"]=> int(1) ["Name"]=> string(20) "initiated_by_magento" }
}
}
There is no mention of the giftcard leading to the issue that amountCredit !== (ArticleUnitPrice + ShippingCosts)
In the payment method you see in the getRequestArticlesData method that third party giftcards are added to the order
https://github.com/buckaroo-it/Magento2/blob/v1.25.4-RC1/Model/Method/Afterpay.php#L740
However when looking at the getCreditmemoArticleData method, we see no such mention. It seems to me that this method should include the used giftcard for use in refund as well.
Putting the remaining value from the gift card as adjustment refund doesnt work either because then you get a Magento error stating that the total refund value exceeds the grand total.
steps to reproduce
expected result
actual result
Ideally the balance on the used giftcard would also be restored after a successful creditmemo. But perhaps that is more specific to the amasty extension and out of scope for the buckaroo integration.
We're currently running v1.24.0 on production, but I've also had a look at the more recent gifcard related changes between 1.24 and master, but those seemed to be for buckaroo giftcards like fashion cheque and had no effect for third party amasty giftcards when i tried applying those changes as patches on our test environment.
As system-intergrators / end-users we like to see what and why stuff in the code has changed
Almost all commits now show nothing more than what looks like an internal reference to an issue (as in HP-23)
As we don't have access to those issues we are now unable to see which code has changed for which reason
A very good guide on writing commit messages: https://chris.beams.io/posts/git-commit/
Hello everyone,
While deploying a shop for a customer we came across the following bug.
In the following file, the method-renderer for the credit cards tries to fetch a configuration setting for IDEAL from the window.checkoutconfig.
https://github.com/buckaroo-it/Magento2/blob/master/view/frontend/web/js/view/payment/method-renderer/creditcard.js
On line 78 you see the following:
this.selectionType = window.checkoutConfig.payment.buckaroo.ideal.selectionType;
When IDEAL is turned off as a payment method, window.checkoutConfig.payment.buckaroo.ideal
will not be available, and thus the application will throw the following error:
cannot read "selectionType" of undefined
.
I have been able to reproduce this in a live environment and a local environment, and was able to fix it by changing ideal to credit card.
Magento version: 2.3.4
PHP version: 7.3.19
Please fix this as soon as possible, thanks in advance.
Kind Regards,
Wouter Folkertsma
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.