WebService::PayPal::PaymentsAdvanced::Error::HostedForm - An error message which has been parsed out of a hosted form
version 0.000028
use Try::Tiny; use WebService::PayPal::PaymentsAdvanced; my $payments = WebService::PayPal::PaymentsAdvanced->new(...); my $response = $payments->create_secure_token(...); my $uri; try { $uri = $payments->hosted_form_uri($response); } catch { die $_ unless blessed $_; if ( $_->isa( 'WebService::PayPal::PaymentsAdvanced::Error::HostedForm') ) { log_hosted_form_error( message => $_->message, response_content => $_->http_response->content, ); } # handle other exceptions };
This class represents an error which is embedded into the HTML of a hosted form. It will only be thrown if you have enabled "validate_hosted_form_uri" in WebService::PayPal::PaymentsAdvanced.
It extends Throwable::Error and adds one attribute of its own. The message attribute (inherited from Throwable::Error) will contain the error message which was parsed out of the content of the HTML.
The $error->message(), and $error->stack_trace() methods are inherited from Throwable::Error.
$error->message()
$error->stack_trace()
Returns the HTTP::Response object which was returned when attempting to GET the hosted form.
Returns the HTTP status code for the response.
The URI of the request that caused the error.
Bugs may be submitted through https://github.com/maxmind/webservice-paypal-paymentsadvanced/issues.
Olaf Alders <olaf@wundercounter.com>
This software is copyright (c) 2022 by MaxMind, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::PayPal::PaymentsAdvanced, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::PayPal::PaymentsAdvanced
CPAN shell
perl -MCPAN -e shell install WebService::PayPal::PaymentsAdvanced
For more information on module installation, please visit the detailed CPAN module installation guide.