QR Code delivered on checkout

Whenever a customer finish the checkout even if payment isn't successful still they receive the ticket and the QR code for it. I tried to remove it from the option under settings in WooCommerce but it still gives the ticket even when payment isnt successful