Closed NickdeK closed 2 years ago
Thanks @NickdeK, we are looking into this :)
Hi @Buckaroo-Rens, sorry to bother you, but do you have any update on this? If you have a quick fix that we could apply temporally that would be already by helpful :)
Hi @NickdeK I went through the reported issue and compared it with the standard Magento checkout that is supported
The request sent to set-payment-information contains the skip-validation
{
"method": "buckaroo_magento2_ideal",
"additional_data": {
"buckaroo_skip_validation": "true"
}
}
and it's been like that for quite some time, due to save-payment.js
- see the selector:
payload.paymentMethod = {
method: $('.payment-methods input[type="radio"][name="payment[method]"]:checked').data('method') || $('.payment-methods input[type="radio"][name="payment[method]"]:checked').val(),
additional_data: {
buckaroo_skip_validation: 'true'
}
};
The Rubic_CleanCheckout extension seems to impact the way this works and would need more information about how the module is actually is implemented on the environment you are using. If you can please email to support@buckaroo.nl some details about where we can have a look at the dev/test environment or share additional details, we can continue the conversation on the support channel.
Fixed and released in v1.39.0 (blind fix).
@Buckaroo-Rens the issue still present in v1.39.0 (Magento 2.4.3) default checkout
@glevhen Sorry but this is not reproducible from our side. Not in standard checkout as well in OneStepCheckout. Please send a email to support@buckaroo.nl with your research and access (ftp/ssh) to your staging environment.
I have the same issue when using the magento graphql: when calling this mutation { setPaymentMethodOnCart( input: { cart_id: "" payment_method: { code: "buckaroo_magento2_ideal" } }
) { cart { selected_payment_method { code title } } } }
i get this as a result { "errors": [ { "message": "Please select a issuer from the list", "extensions": { "category": "graphql-input" }, "locations": [ { "line": 14, "column": 3 } ], "path": [ "setPaymentMethodOnCart" ] } ], "data": { "setPaymentMethodOnCart": null } }
@raoulguillermo the graphql query should look like:
input: {
cart_id: $cartId
payment_method: {
code: $methodCode
buckaroo_additional: { buckaroo_magento2_ideal: { issuer: "ABNANL2A" } }
}
}
) {
cart {
items {
product {
name
sku
}
}
}
}```
@raoulguillermo the graphql query should look like:
input: { cart_id: $cartId payment_method: { code: $methodCode buckaroo_additional: { buckaroo_magento2_ideal: { issuer: "ABNANL2A" } } } } ) { cart { items { product { name sku } } } }```
works!
This happens in
vendor/buckaroo/magento2/view/frontend/web/js/view/payment/method-renderer/ideal.js:153
that triggers aset-payment-information
request. This eventually leads to a response fromvendor/buckaroo/magento2/Model/Method/Ideal.php:155
with the error.I think no validation should be done when a user clicks the iDeal payment method without selecting a bank. I saw the
$skipValidation
check invendor/buckaroo/magento2/Model/Method/Ideal.php:139
and tried to manipulate the data invendor/buckaroo/magento2/view/frontend/web/js/view/payment/method-renderer/ideal.js:153
to add thebuckaroo_skip_validation
in theadditional_data
(as done herevendor/buckaroo/magento2/view/frontend/web/js/view/payment/save-payment.js:80
) in the hopes to prevent this issue without succes. Invendor/magento/module-sales-rule/view/frontend/web/js/action/select-payment-method-mixin.js:26
the data is consumed and only thepaymentMethod.method
is extracted to eventually by added to the payload, thebuckaroo_skip_validation
therefor never reaches the validation method in the PHP file.I'm confused why the validation is done on payment selection. The user is clearly in the process of filing in the required forms, generating the exception is a bit eager I think.