Hi,
We have developed a custom payment provider for Braintree payment gateway and implemented for a client. We are having an issue that the cart is emptied when user cancel the payment and come back to the check out page. We tried the setting "Keep cart in context after checkout step" but If we enable this setting, this cart emptied issue will not happen but we will face another issue. After the payment is successful and redirected back to cart, the order is not marked as completed and show empty cart instead of receipt page. We can see the order from management center, Ecommerce --> order but the order is not marked completed even payment is successful. If we don't enable the "Keep cart in context after checkout step" setting, the payment is successful and order is completed and the reciept will be displayed when redirected back to cart. Kindly find the attachment for the braintreepaymenthandler.cs file and please let me know if you need any more information to help me resolve the issue. Thanks.
Regards,
Thaw