I am using open-cart v1.5.6 .
I want if order gets failed via credit card there should be an option to convert it into COD (Cash on Delivery) there. I just created a layout of failed order but I want the COD option there for users to quickly convert orders into COD.
"index.php?route=payment/icicipg/callback"
in admin panel check the id of COD . suppose it is 6. When someone use credit card , when order does not place and your api return some error than at that condition update the payment method id 6 for that particular order.