line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::CyberSource::Request::Credit; |
2
|
1
|
|
|
1
|
|
1451957
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
3
|
use namespace::autoclean; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.010008'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
79
|
use Moose; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
extends 'Business::CyberSource::Request'; |
10
|
|
|
|
|
|
|
with qw( |
11
|
|
|
|
|
|
|
Business::CyberSource::Request::Role::DCC |
12
|
|
|
|
|
|
|
Business::CyberSource::Request::Role::TaxService |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
4722
|
use MooseX::Types::CyberSource qw( BillTo Card CreditService ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
6944
|
use Module::Runtime qw( use_module ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _build_service { |
20
|
1
|
|
|
1
|
|
8342
|
use_module('Business::CyberSource::RequestPart::Service::Credit'); |
21
|
1
|
|
|
|
|
41
|
return Business::CyberSource::RequestPart::Service::Credit->new; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has '+service' => ( |
25
|
|
|
|
|
|
|
isa => CreditService, |
26
|
|
|
|
|
|
|
remote_name => 'ccCreditService' |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has bill_to => ( |
30
|
|
|
|
|
|
|
isa => BillTo, |
31
|
|
|
|
|
|
|
remote_name => 'billTo', |
32
|
|
|
|
|
|
|
traits => ['SetOnce'], |
33
|
|
|
|
|
|
|
is => 'rw', |
34
|
|
|
|
|
|
|
coerce => 1, |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has card => ( |
38
|
|
|
|
|
|
|
isa => Card, |
39
|
|
|
|
|
|
|
remote_name => 'card', |
40
|
|
|
|
|
|
|
traits => ['SetOnce'], |
41
|
|
|
|
|
|
|
is => 'rw', |
42
|
|
|
|
|
|
|
coerce => 1, |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# ABSTRACT: CyberSource Credit Request Object |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=pod |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=encoding UTF-8 |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 NAME |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Business::CyberSource::Request::Credit - CyberSource Credit Request Object |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 VERSION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
version 0.010008 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SYNOPSIS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
use Business::CyberSource::Request::Credit; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
my $req = Business::CyberSource::Request::Credit->new({ |
69
|
|
|
|
|
|
|
reference_code => 'merchant reference code', |
70
|
|
|
|
|
|
|
bill_to => { |
71
|
|
|
|
|
|
|
first_name => 'Caleb', |
72
|
|
|
|
|
|
|
last_name => 'Cushing', |
73
|
|
|
|
|
|
|
street => 'somewhere', |
74
|
|
|
|
|
|
|
city => 'Houston', |
75
|
|
|
|
|
|
|
state => 'TX', |
76
|
|
|
|
|
|
|
postal_code => '77064', |
77
|
|
|
|
|
|
|
country => 'US', |
78
|
|
|
|
|
|
|
email => 'xenoterracide@gmail.com', |
79
|
|
|
|
|
|
|
}, |
80
|
|
|
|
|
|
|
purchase_totals => { |
81
|
|
|
|
|
|
|
total => 5.00, |
82
|
|
|
|
|
|
|
discount => 0.50, # optional |
83
|
|
|
|
|
|
|
duty => 0.01, # optional |
84
|
|
|
|
|
|
|
currency => 'USD', |
85
|
|
|
|
|
|
|
}, |
86
|
|
|
|
|
|
|
card => { |
87
|
|
|
|
|
|
|
account_number => '4111-1111-1111-1111', |
88
|
|
|
|
|
|
|
expiration => { |
89
|
|
|
|
|
|
|
month => '09', |
90
|
|
|
|
|
|
|
year => '2025', |
91
|
|
|
|
|
|
|
}, |
92
|
|
|
|
|
|
|
}, |
93
|
|
|
|
|
|
|
invoice_header => { |
94
|
|
|
|
|
|
|
purchaser_vat_registration_number => 'ATU99999999', |
95
|
|
|
|
|
|
|
user_po => '123456', |
96
|
|
|
|
|
|
|
vat_invoice_reference_number => '1234', |
97
|
|
|
|
|
|
|
}, |
98
|
|
|
|
|
|
|
other_tax => { |
99
|
|
|
|
|
|
|
alternate_tax_amount => '0.10', |
100
|
|
|
|
|
|
|
alternate_tax_indicator => 1, |
101
|
|
|
|
|
|
|
vat_tax_amount => '0.10', |
102
|
|
|
|
|
|
|
vat_tax_rate => '0.10', |
103
|
|
|
|
|
|
|
}, |
104
|
|
|
|
|
|
|
}); |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 DESCRIPTION |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This object allows you to create a request for a credit. You can use |
109
|
|
|
|
|
|
|
L<Business::CyberSource::Request::StandAloneCredit> or the |
110
|
|
|
|
|
|
|
L<Business::CyberSource::Request::FollowOnCredit> if you want your objects to |
111
|
|
|
|
|
|
|
be checked for all required fields. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 EXTENDS |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
L<Business::CyberSource::Request> |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 WITH |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=over |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=item L<Business::CyberSource::Request::Role::DCC> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=back |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 BUGS |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Please report any bugs or feature requests on the bugtracker website |
128
|
|
|
|
|
|
|
https://github.com/hostgator/business-cybersource/issues |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
When submitting a bug or request, please include a test-file or a |
131
|
|
|
|
|
|
|
patch to an existing test-file that illustrates the bug or desired |
132
|
|
|
|
|
|
|
feature. |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head1 AUTHOR |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Caleb Cushing <xenoterracide@gmail.com> |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
This software is Copyright (c) 2017 by Caleb Cushing <xenoterracide@gmail.com>. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
This is free software, licensed under: |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=cut |