When checkout success, I redirect to a success page with order id, this page has Confirm Payment button. And I click on the button it will show confirm payment page (contains confirm payment form). How to autofill order id into Order Id field in my form? Thanks.
1 Answer
You can add below code to your text box value
<?php echo Mage::getSingleton('checkout/session')->getLastRealOrderId(); ?>
For Ex:
<input type="text" name="order_id" value="<?php echo Mage::getSingleton('checkout/session')->getLastRealOrderId(); ?>">