The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::PayPal::PaymentsAdvanced::Response::SecureToken - Response class for creating secure tokens

VERSION

version 0.000028

SYNOPSIS

    my $ppa = WebService::PayPal::PaymentsAdvanced->new( ... );
    my $response = $ppa->create_secure_token( ... );

DESCRIPTION

You should not create this response object directly. It will be provided to you via "<create_secure_token" in WebService::PayPal::PaymentsAdvanced.

OPTIONS

hosted_form_mode

Sets the MODE query parameter on hosted_form_uri. This can be LIVE or TEST.

The URL for the PayflowLink web service. Can be a mocked URL.

validate_hosted_form_uri

Bool which indicates whether we should pre-fetch the hosted form and do some error checking (recommended).

retry_attempts

The number of HTTP retries to attempt if we encounter an error response. We retry only when encountering HTTP 5xx responses.

retry_callback

A callback function we call prior to retrying the HTTP request to PayPal. We call this function only when a retry will take place afterwards. Note we retry only when there are retry attempts remaining, and only when encountering HTTP 5xx errors.

This callback is useful if you want to know about each request failure. Consider a case where the first request failed, and then a retry request succeeded. If you want to know about the first failure, you can provide a callback that we call prior to the retry. In this scenario, you may want your callback function to write a message to a log.

The callback will receive a single parameter, an HTTP::Response object. This is the response to the request that failed.

METHODS

This module inherits from WebService::PayPal::PaymentsAdvanced::Response, please see its documentation for a list of the methods which it provides..

hosted_form_uri

Returns a URI object which you can use either to insert an iframe into your pages or redirect the user to PayPal directly in order to make a payment.

    use WebService::PayPal::PaymentsAdvanced;
    my $payments = WebService::PayPal::PaymentsAdvanced->new(
        validate_hosted_form_uri => 1, ... );

    my $response = $payments->create_secure_token(...);
    my $uri      = $response->hosted_form_uri;

params

A HashRef of parameters which have been returned by PayPal.

secure_token

Returns the PayPal SECURETOKEN param.

secure_token_id

Returns the PayPal SECURETOKENID param.

SUPPORT

Bugs may be submitted through https://github.com/maxmind/webservice-paypal-paymentsadvanced/issues.

AUTHOR

Olaf Alders <olaf@wundercounter.com>

COPYRIGHT AND LICENSE

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.