File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
app/code/Magento/Checkout/Model Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 11
11
use Magento \Checkout \Api \PaymentProcessingRateLimiterInterface ;
12
12
use Magento \Checkout \Api \PaymentSavingRateLimiterInterface ;
13
13
use Magento \Framework \App \ObjectManager ;
14
+ use Magento \Framework \Exception \LocalizedException ;
14
15
use Magento \Quote \Api \CartRepositoryInterface ;
15
16
use Magento \Framework \Exception \CouldNotSaveException ;
16
17
use Magento \Quote \Model \Quote ;
@@ -139,9 +140,14 @@ public function savePaymentInformationAndPlaceOrder(
139
140
}
140
141
try {
141
142
$ orderId = $ this ->cartManagement ->placeOrder ($ cartId );
142
- } catch (\ Magento \ Framework \ Exception \ LocalizedException $ e ) {
143
+ } catch (LocalizedException $ e ) {
143
144
$ this ->logger ->critical (
144
- 'Placing an order with quote_id ' . $ cartId . ' is failed: ' . $ e ->getMessage ()
145
+ 'Placing an Order failed (reason: ' . $ e ->getMessage () .') ' ,
146
+ [
147
+ 'quote_id ' => $ cartId ,
148
+ 'exception ' => (string )$ e ,
149
+ 'is_guest_checkout ' => true
150
+ ]
145
151
);
146
152
throw new CouldNotSaveException (
147
153
__ ($ e ->getMessage ()),
Original file line number Diff line number Diff line change @@ -152,7 +152,12 @@ public function savePaymentInformationAndPlaceOrder(
152
152
$ orderId = $ this ->cartManagement ->placeOrder ($ cartId );
153
153
} catch (LocalizedException $ e ) {
154
154
$ this ->logger ->critical (
155
- 'Placing an order with quote_id ' . $ cartId . ' is failed: ' . $ e ->getMessage ()
155
+ 'Placing an Order failed (reason: ' . $ e ->getMessage () .') ' ,
156
+ [
157
+ 'quote_id ' => $ cartId ,
158
+ 'exception ' => (string )$ e ,
159
+ 'is_guest_checkout ' => false
160
+ ]
156
161
);
157
162
throw new CouldNotSaveException (
158
163
__ ($ e ->getMessage ()),
You can’t perform that action at this time.
0 commit comments