line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::CyberSource::Factory::Request; |
2
|
1
|
|
|
1
|
|
682
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
71
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
600
|
use namespace::autoclean; |
|
1
|
|
|
|
|
1377
|
|
|
1
|
|
|
|
|
12
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.010006'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
100
|
use MooseX::AbstractFactory; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
9
|
|
|
|
|
|
|
implementation_class_via sub { 'Business::CyberSource::Request::' . shift }; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
12
|
|
|
|
|
|
|
1; |
13
|
|
|
|
|
|
|
# ABSTRACT: CyberSource Request Factory Module |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__END__ |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=pod |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=encoding UTF-8 |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Business::CyberSource::Factory::Request - CyberSource Request Factory Module |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
version 0.010006 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
use Business::CyberSource::Factory::Request; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $factory = Business::CyberSource::Factory::Request->new; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $request_obj = $factory->create( |
36
|
|
|
|
|
|
|
'Authorization', { |
37
|
|
|
|
|
|
|
reference_code => '42', |
38
|
|
|
|
|
|
|
bill_to => { |
39
|
|
|
|
|
|
|
first_name => 'Caleb', |
40
|
|
|
|
|
|
|
last_name => 'Cushing', |
41
|
|
|
|
|
|
|
street => '100 somewhere st', |
42
|
|
|
|
|
|
|
city => 'Houston', |
43
|
|
|
|
|
|
|
state => 'TX', |
44
|
|
|
|
|
|
|
postal_code => '77064', |
45
|
|
|
|
|
|
|
country => 'US', |
46
|
|
|
|
|
|
|
email => 'xenoterracide@gmail.com', |
47
|
|
|
|
|
|
|
}, |
48
|
|
|
|
|
|
|
purchase_totals => { |
49
|
|
|
|
|
|
|
currency => 'USD', |
50
|
|
|
|
|
|
|
total => 5.00, |
51
|
|
|
|
|
|
|
}, |
52
|
|
|
|
|
|
|
card => { |
53
|
|
|
|
|
|
|
account_number => '4111111111111111', |
54
|
|
|
|
|
|
|
expiration => { |
55
|
|
|
|
|
|
|
month => 9, |
56
|
|
|
|
|
|
|
year => 2025, |
57
|
|
|
|
|
|
|
}, |
58
|
|
|
|
|
|
|
}, |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 DESCRIPTION |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This Module is to provide a replacement for what |
65
|
|
|
|
|
|
|
L<Business::CyberSource::Request> originally was, a factory. Once backwards |
66
|
|
|
|
|
|
|
compatibility is no longer needed this code may be removed. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 METHODS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 new |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 create |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
$factory->create( $implementation, { ... } ) |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Create a new request object. C<create> takes a request implementation and a hashref to pass to the |
77
|
|
|
|
|
|
|
implementation's C<new> method. The implementation string accepts any |
78
|
|
|
|
|
|
|
implementation whose package name is prefixed by |
79
|
|
|
|
|
|
|
C<Business::CyberSource::Request::>. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
my $req = $factory->create( |
82
|
|
|
|
|
|
|
'Capture', |
83
|
|
|
|
|
|
|
{ |
84
|
|
|
|
|
|
|
first_name => 'John', |
85
|
|
|
|
|
|
|
last_name => 'Smith', |
86
|
|
|
|
|
|
|
... |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
); |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 SEE ALSO |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=over |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item * L<MooseX::AbstractFactory> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=back |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 BUGS |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Please report any bugs or feature requests on the bugtracker website |
101
|
|
|
|
|
|
|
https://github.com/xenoterracide/business-cybersource/issues |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
When submitting a bug or request, please include a test-file or a |
104
|
|
|
|
|
|
|
patch to an existing test-file that illustrates the bug or desired |
105
|
|
|
|
|
|
|
feature. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 AUTHOR |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Caleb Cushing <xenoterracide@gmail.com> |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This software is Copyright (c) 2015 by Caleb Cushing <xenoterracide@gmail.com>. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This is free software, licensed under: |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=cut |