| 1 | |||
| 2 | package Net::Simplify::AuthenticationException; | ||
| 3 | |||
| 4 | =head1 NAME | ||
| 5 | |||
| 6 | Net::Simplify::AuthenticationException - Simplify Commerce exception for authentication errors | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | use Net::Simplify; | ||
| 11 | |||
| 12 | $Net::Simplify::public_key = 'YOUR PUBLIC KEY'; | ||
| 13 | $Net::Simplify::private_key = 'YOUR PRIVATE KEY'; | ||
| 14 | |||
| 15 | eval { | ||
| 16 | my $payment = Net::Simplify::Payment->create(....); | ||
| 17 | }; | ||
| 18 | if ($@) { | ||
| 19 | if ($@->isa('Net::Simplify::AuthenticationException')) { | ||
| 20 | printf "Authentication exception: %s\n", $@->message; | ||
| 21 | } | ||
| 22 | } | ||
| 23 | |||
| 24 | =head1 DESCRIPTION | ||
| 25 | |||
| 26 | An exception that is thrown for any API calls that result in an authentication error. See the base class | ||
| 27 | L<Net::Simplify::ApiException> for a list of methods. | ||
| 28 | |||
| 29 | =head1 SEE ALSO | ||
| 30 | |||
| 31 | L<Net::Simplify>, | ||
| 32 | L<Net::Simplify::ApiException>, | ||
| 33 | L<http://www.simplify.com> | ||
| 34 | |||
| 35 | =head1 VERSION | ||
| 36 | |||
| 37 | 1.6.0 | ||
| 38 | |||
| 39 | =head1 LICENSE | ||
| 40 | |||
| 41 | Copyright (c) 2013 - 2022 MasterCard International Incorporated | ||
| 42 | All rights reserved. | ||
| 43 | |||
| 44 | Redistribution and use in source and binary forms, with or without modification, are | ||
| 45 | permitted provided that the following conditions are met: | ||
| 46 | |||
| 47 | Redistributions of source code must retain the above copyright notice, this list of | ||
| 48 | conditions and the following disclaimer. | ||
| 49 | Redistributions in binary form must reproduce the above copyright notice, this list of | ||
| 50 | conditions and the following disclaimer in the documentation and/or other materials | ||
| 51 | provided with the distribution. | ||
| 52 | Neither the name of the MasterCard International Incorporated nor the names of its | ||
| 53 | contributors may be used to endorse or promote products derived from this software | ||
| 54 | without specific prior written permission. | ||
| 55 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY | ||
| 56 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 57 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT | ||
| 58 | SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 59 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
| 60 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
| 61 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | ||
| 62 | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
| 63 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 64 | SUCH DAMAGE. | ||
| 65 | |||
| 66 | =cut | ||
| 67 | |||
| 68 | use 5.006; | ||
| 69 | use strict; | ||
| 70 | use warnings FATAL => 'all'; | ||
| 71 | |||
| 72 | our @ISA = qw(Net::Simplify::ApiException); | ||
| 73 | |||
| 74 | 1; |