在一个表单上执行两个操作

I have payment system on my website.

Right now users make payments in two steps: first step - order is created and placed in my database, second step - i generate form for billing system with "Pay" button and some hidden fields. After user clicks "Pay" - billing system page is loaded and users enters his credit card info.

I want to make it simpler for user - so there will be only one step with "Pay" button. How it can be done?

You can process the both page by adding a Javascipt method to the click method of the submit button (for exemple to display the bill) ...