| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Stancer::Core::Types::Object; |
|
2
|
|
|
|
|
|
|
|
|
3
|
60
|
|
|
60
|
|
209977
|
use 5.020; |
|
|
60
|
|
|
|
|
257
|
|
|
4
|
60
|
|
|
60
|
|
373
|
use strict; |
|
|
60
|
|
|
|
|
135
|
|
|
|
60
|
|
|
|
|
2916
|
|
|
5
|
60
|
|
|
60
|
|
294
|
use warnings; |
|
|
60
|
|
|
|
|
146
|
|
|
|
60
|
|
|
|
|
7114
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Internal object types |
|
8
|
|
|
|
|
|
|
our $VERSION = '1.0.3'; # VERSION |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @EXPORT_OK = (); |
|
11
|
|
|
|
|
|
|
our %EXPORT_TAGS = ('all' => \@EXPORT_OK); |
|
12
|
|
|
|
|
|
|
|
|
13
|
60
|
|
|
60
|
|
1034
|
use Stancer::Core::Types::Helper qw(create_instance_type); |
|
|
60
|
|
|
|
|
126
|
|
|
|
60
|
|
|
|
|
3729
|
|
|
14
|
60
|
|
|
60
|
|
27295
|
use Stancer::Exceptions::InvalidAuthInstance; |
|
|
60
|
|
|
|
|
302
|
|
|
|
60
|
|
|
|
|
2839
|
|
|
15
|
60
|
|
|
60
|
|
30663
|
use Stancer::Exceptions::InvalidCardInstance; |
|
|
60
|
|
|
|
|
258
|
|
|
|
60
|
|
|
|
|
2601
|
|
|
16
|
60
|
|
|
60
|
|
31114
|
use Stancer::Exceptions::InvalidCustomerInstance; |
|
|
60
|
|
|
|
|
425
|
|
|
|
60
|
|
|
|
|
2813
|
|
|
17
|
60
|
|
|
60
|
|
40897
|
use Stancer::Exceptions::InvalidDeviceInstance; |
|
|
60
|
|
|
|
|
285
|
|
|
|
60
|
|
|
|
|
2851
|
|
|
18
|
60
|
|
|
60
|
|
31267
|
use Stancer::Exceptions::InvalidPaymentInstance; |
|
|
60
|
|
|
|
|
262
|
|
|
|
60
|
|
|
|
|
2673
|
|
|
19
|
60
|
|
|
60
|
|
31565
|
use Stancer::Exceptions::InvalidRefundInstance; |
|
|
60
|
|
|
|
|
270
|
|
|
|
60
|
|
|
|
|
3646
|
|
|
20
|
60
|
|
|
60
|
|
30656
|
use Stancer::Exceptions::InvalidSepaInstance; |
|
|
60
|
|
|
|
|
316
|
|
|
|
60
|
|
|
|
|
2801
|
|
|
21
|
60
|
|
|
60
|
|
36449
|
use Stancer::Exceptions::InvalidSepaCheckInstance; |
|
|
60
|
|
|
|
|
269
|
|
|
|
60
|
|
|
|
|
2791
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
60
|
|
|
60
|
|
461
|
use namespace::clean; |
|
|
60
|
|
|
|
|
131
|
|
|
|
60
|
|
|
|
|
345
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
60
|
|
|
60
|
|
18116
|
use Exporter qw(import); |
|
|
60
|
|
|
|
|
147
|
|
|
|
60
|
|
|
|
|
8533
|
|
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my @defs = (); |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
for my $name (qw(Auth Card Customer Device Payment Refund Sepa Sepa::Check)) { |
|
30
|
|
|
|
|
|
|
push @defs, create_instance_type($name); |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Stancer::Core::Types::Helper::register_types(\@defs, __PACKAGE__); |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=pod |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding UTF-8 |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Stancer::Core::Types::Object - Internal object types |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 VERSION |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
version 1.0.3 |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 USAGE |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 Logging |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
We use the L<Log::Any> framework for logging events. |
|
58
|
|
|
|
|
|
|
You may tell where it should log using any available L<Log::Any::Adapter> module. |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
For example, to log everything to a file you just have to add a line to your script, like this: |
|
61
|
|
|
|
|
|
|
#! /usr/bin/env perl |
|
62
|
|
|
|
|
|
|
use Log::Any::Adapter (File => '/var/log/payment.log'); |
|
63
|
|
|
|
|
|
|
use Stancer::Core::Types::Object; |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
You must import C<Log::Any::Adapter> before our libraries, to initialize the logger instance before use. |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
You can choose your log level on import directly: |
|
68
|
|
|
|
|
|
|
use Log::Any::Adapter (File => '/var/log/payment.log', log_level => 'info'); |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Read the L<Log::Any> documentation to know what other options you have. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 SECURITY |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=over |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Never, never, NEVER register a card or a bank account number in your database. |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Always uses HTTPS in card/SEPA in communication. |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Our API will never give you a complete card/SEPA number, only the last four digits. |
|
89
|
|
|
|
|
|
|
If you need to keep track, use these last four digit. |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=back |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 BUGS |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Please report any bugs or feature requests on the bugtracker website |
|
98
|
|
|
|
|
|
|
L<https://gitlab.com/wearestancer/library/lib-perl/-/issues> or by email to |
|
99
|
|
|
|
|
|
|
L<bug-stancer@rt.cpan.org|mailto:bug-stancer@rt.cpan.org>. |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
When submitting a bug or request, please include a test-file or a |
|
102
|
|
|
|
|
|
|
patch to an existing test-file that illustrates the bug or desired |
|
103
|
|
|
|
|
|
|
feature. |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 AUTHOR |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Joel Da Silva <jdasilva@cpan.org> |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This software is Copyright (c) 2018-2024 by Stancer / Iliad78. |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This is free software, licensed under: |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=cut |