I do not think you need to scrape the page. Here is what I think you should do:
- Fill form details on page 1
- Submit the form on page 1
- Get forwarded to page 2
- A special unique code is generated by 3rd party software on form 2
- Submit this unique code to the server via AJAX
- Once the code is save, display it to the user
As you can see,
- You do not need to scrape, but rather read the code that is returned to you before displaying it
- You submit that code via AJAX, so no need to do a submit action
If you have to absolutely scrape (which I highly doubt), then you go ahead with that, but after you do, you still have to submit your code via AJAX.
Hope this helps.