on the details page, save the entered information to a database using Data Assist insert record.
this will save the entered record ID using a session variable.
on the payment page, add an add to cart behavior to add the payment to the eCart cart object. the eCart cart object should have a column to store the ID from the details page.
use the checkout wizard to create the checkout pages and process the payment through the gateway.
the checkout system will save the order to the orders and order details pages. the order details should contain a column that stores the delegate ID value to create a relation between the order and the record that was inserted by the details page.