I found my error. I ended up using $mech->save_content(‘result.html’)
at the end of my script and, lo and behold, it produced the confirm.htm page
with an error. I had forgotten to add the cardholder’s name field to the final
form submission, so of course, SurfShop was returning the sa
> On Apr 25, 2017, at 10:09 AM, Chas. Owens wrote:
>
> Are you using JavaScript to redirect the user to the sorry page?
Nope. All navigation is handled by perl. Thanks for the link, though.
Frank
Are you using JavaScript to redirect the user to the sorry page? If so
then WWW::Mechanise won't redirect. It doesn't understand JavaScript.
Happily, there are drop in replacements for it that do:
http://search.cpan.org/~oalders/WWW-Mechanize-1.84/lib/WWW/Mechanize/FAQ.pod#Which_modules_work_lik
Here’s more information on this situation. SurfShop uses two main HTML
templates, main.htm and secure.htm. Then there are sub-templates that get
loaded as the content of those two main templates.
During checkout, secure.htm is used. If the order is successful,
receipt.htm is
I’ve written a script using WWW::Mechanize to place test orders in
SurfShop. I wish I had know it could do this before. :\ For some reason, I
was under the impression that it was only good for scraping.
The script works great, but I need to find a way to get the contents of