{"data":{"id":"ACSD-64431","source":"qpt","sourceRef":"magento/quality-patches@1.1.84","title":"The \"placeOrder\" mutation that contains the coupon code information in the request no longer throws an internal error, but instead shows that the order was placed successfully.","categories":["GraphQL","Order/Checkout"],"components":["magento/module-sales-graph-ql","magento/module-sales-rule-graph-ql"],"origin":"adobe-commerce-support","documentation":{"url":"https://experienceleague.adobe.com/en/docs/commerce-operations/tools/quality-patches-tool/patches-available-in-qpt/v1-1-61/acsd-64431-placeorder-mutation-with-coupon-code-throws-error","path":"help/tools/quality-patches-tool/patches-available-in-qpt/v1-1-61/acsd-64431-placeorder-mutation-with-coupon-code-throws-error.md","blobSha":"95cc533d9049960add5f516cc8764d01bce3eff3","description":"The placeOrder mutation that contains the coupon code information in the request throws an internal error, instead of placing the order successfully.","stepsToReproduce":"1. Create a simple product with _SKU 2836611_. 1. Create a Cart Price Rule, set Coupon to Specific Coupon and enter _TEST1234_ as the coupon code. 1. Create a customer: mutation { createCustomer( input: { firstname: \"John\" lastname: \"Doe\" email: \"john.doe@example.com\" password: \"b1b2b3l@w+\" is_subscribed: true } ) { customer { firstname lastname email is_subscribed } } } 1. Generate a customer token. You can use this token for subsequent requests. mutation { generateCustomerToken(email: \"john.doe@example.com\", password: \"b1b2b3l@w+\") { token } } 1. Create an empty cart. Save the cart ID and use it for the subsequent requests. mutation { createEmptyCart } 1. Add the product to the cart: mutation { addProductsToCart( cartId: \"xxxx\" cartItems: [{ quantity: 1, sku: \"2836611\" }] ) { cart { itemsV2 { items { product { name sku } ... on ConfigurableCartItem { configurable_options { configurable_product_option_uid value_label } } quantity } total_count page_info { page_size current_page total_pages } } } user_errors { code message } } } 1. Apply the coupon: mutation { applyCouponToCart(input: { cart_id: \"xxxx\", coupon_code: \"TEST1234\" }) { cart { itemsV2 { items { product { name } quantity } total_count page_info { page_size current_page total_pages } } applied_coupons { code } prices { grand_total { value currency } } } } } 1. Set a shipping address: mutation { setShippingAddressesOnCart( input: { cart_id: \"xxxxx\" shipping_addresses: [ { address: { firstname: \"John\" lastname: \"Doe\" company: \"Company Name\" street: [\"3320 N Crescent Dr\", \"Beverly Hills\"] city: \"Los Angeles\" region: \"CA\" region_id: 12 postcode: \"90210\" country_code: \"US\" telephone: \"123-456-0000\" save_in_address_book: false } } ] } ) { cart { shipping_addresses { firstname lastname company street city region { code label } postcode telephone country { code label } available_shipping_methods { carrier_code carrier_title method_code method_title } } } } } 1. Set a shipping method: mutation { setShippingMethodsOnCart( input: { cart_id: \"xxxx\" shipping_methods: [{ carrier_code: \"flatrate\", method_code: \"flatrate\" }] } ) { cart { shipping_addresses { selected_shipping_method { carrier_code carrier_title method_code method_title amount { value currency } } } } } } 1. Set a billing address: mutation { setBillingAddressOnCart( input: { cart_id: \"xxxx\" billing_address: { address: { firstname: \"John\" lastname: \"Doe\" company: \"Company Name\" street: [\"64 Strawberry Dr\", \"Beverly Hills\"] city: \"Los Angeles\" region: \"CA\" region_id: 12 postcode: \"90210\" country_code: \"US\" telephone: \"123-456-0000\" save_in_address_book: true } } } ) { cart { billing_address { firstname lastname company street city region { code label } postcode telephone country { code label } } } } } 1. Set a payment method: mutation { setPaymentMethodOnCart( input: { cart_id: \"xxxx\", payment_method: { code: \"checkmo\" } } ) { cart { selected_payment_method { code } } } } 1. Place the order: mutation { placeOrder( input: { cart_id: \"{{cart_id}}\" } ) { orderV2 { number token } errors { message code } } }","introducedInQpt":"1.1.61","createdFor":["2.4.7-p3"],"documentedRange":"2.4.7 - 2.4.7-p4","scheduledFixRelease":"2.4.8"},"files":[{"package":"magento/magento2-base","constraint":">=2.4.7 <2.4.8","path":"patches/os/ACSD-64431_2.4.7-p3.patch","blobSha":"89fb6054839ea1125e7dbcf38e69ba6174f54b9a","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/os/ACSD-64431_2.4.7-p3.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-sales-graph-ql/Model/Resolver/OrderTotal.php","change":"modified","package":"magento/module-sales-graph-ql"},{"path":"vendor/magento/module-sales-rule-graph-ql/Model/Resolver/Coupon.php","change":"modified","package":"magento/module-sales-rule-graph-ql"}],"packages":["magento/module-sales-graph-ql","magento/module-sales-rule-graph-ql"],"hasTests":false,"applicableVersions":{"magento-community":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"magento-commerce":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":null,"deprecated":false}],"applicableVersions":{"magento-community":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"magento-commerce":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"mage-os":[]},"conditions":{"and":[{"type":"log","path":"var/log/exception.log","match":"report.ERROR: \"discount_model\" value should be specifiedGraphQL"}]},"requirements":null},"_documentation":"https://magento.watch/api","_description":"Quality patch ACSD-64431 details"}