File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -423,19 +423,18 @@ function check_razorpay_response()
423
423
$ order ->update_status ('failed ' );
424
424
}
425
425
}
426
- // We don't have a proper order id
427
- else if ($ order_id !== null )
426
+ else
428
427
{
429
428
$ order = new WC_Order ($ order_id );
430
429
$ order ->update_status ('failed ' );
431
430
$ order ->add_order_note ('Customer cancelled the payment ' );
432
431
433
- $ this -> msg [ ' class ' ] = ' error ' ;
434
- $ this -> msg [ ' message ' ] = " An error occured while processing this payment " ;
435
- }
436
- else
437
- {
438
- if (isset ($ _POST ['error ' ]) === true )
432
+ // We don't have a proper order id
433
+ if ( $ order_id !== null )
434
+ {
435
+ $ message = " An error occured while processing this payment " ;
436
+ }
437
+ else if (isset ($ _POST ['error ' ]) === true )
439
438
{
440
439
$ error = $ _POST ['error ' ];
441
440
@@ -451,7 +450,7 @@ function check_razorpay_response()
451
450
$ message = 'An error occured. Please contact administrator for assistance ' ;
452
451
}
453
452
454
- $ this ->msg ['class ' ] = 'Callback URL error ' ;
453
+ $ this ->msg ['class ' ] = 'error ' ;
455
454
$ this ->msg ['message ' ] = $ message ;
456
455
}
457
456
You can’t perform that action at this time.
0 commit comments