Open
Description
Preconditions and environment
- Magento Version: 2.4.5-p4
- PHP Version: 8.1
The bug is testable in graphQl with checkmo. However :
- In REST there must also be the bug because it is the same classes that are used
- Reproducible bug with all methods
Steps to reproduce
- Disable checkmo method
- Create quote in graphQl
- Set addresses and shipping method
- Load payment methods, at this stage the checkmo method is not available
{
"data": {
"cart": {
"available_payment_methods": [
{
"code": "adyen_cc",
"title": "Credit or Debit Card"
},
{
"code": "affirm_gateway",
"title": "Affirm"
}
]
}
}
}
- Set payment method with
setPaymentMethodOnCart
mutation
this mutation return The requested Payment Method is not available.
error, but quote_payment.method
column is updated with checkmo.
- Place order with placeOrder mutation
- Order created 🎉
Expected result
When saving the payment method and placeOrder, the following error should be reported: The requested Payment Method is not available.
When the setPaymentMethodOnCart
mutation is called, there is an error, the quote_payment table should not be updated.
\Magento\Quote\Model\Quote\Payment::importData()
Actual result
The order is created :(
Additional information
mutation setPaymentMethodAndPlaceOrder(
$cartId: String!
$paymentMethod: PaymentMethodInput!
) {
setPaymentMethodOnCart(
input: { cart_id: $cartId, payment_method: $paymentMethod }
) {
cart {
selected_payment_method {
code
title
}
}
}
placeOrder(input: { cart_id: $cartId }) {
order {
order_number
}
}
}
{
"cartId": "CART_TOKEN",
"paymentMethod": {
"code": "checkmo"
}
}
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.