« Business/CyberSource/RequestPart/Service.pm
↑ Summary
Business/CyberSource/RequestPart/Service/Tax.pm »
| 1 | package Business::CyberSource::RequestPart::BusinessRules; | ||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | our $VERSION = '0.010007'; # VERSION | |||||||||
| 7 | |||||||||||
| 8 | 2 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 2 | extends 'Business::CyberSource::MessagePart'; | |||||||||
| 10 | 2 | with 'MooseX::RemoteHelper::CompositeSerialization'; | |||||||||
| 11 | |||||||||||
| 12 | 2 | ▶ | use MooseX::Types::Moose qw( ArrayRef ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 2 | ▶ | use MooseX::Types::Common::String 0.001005 qw( NumericCode ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 2 | ▶ | use MooseX::Types::CyberSource qw( AVSResult ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | my $true_false | ||||||||||
| 17 | = sub { | ||||||||||
| 18 | 2 | ▶ | my ( $attr, $instance ) = @_; | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.2
| |||||||||||
| 19 | 2 | ▶ | return $attr->get_value( $instance ) ? 'true' : 'false'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 2 | }; | |||||||||
| 21 | |||||||||||
| 22 | 2 | has ignore_avs_result => ( | |||||||||
| 23 | isa => 'Bool', | ||||||||||
| 24 | remote_name => 'ignoreAVSResult', | ||||||||||
| 25 | predicate => 'has_ignore_avs_result', | ||||||||||
| 26 | traits => ['SetOnce'], | ||||||||||
| 27 | is => 'rw', | ||||||||||
| 28 | serializer => $true_false, | ||||||||||
| 29 | ); | ||||||||||
| 30 | |||||||||||
| 31 | 2 | has ignore_cv_result => ( | |||||||||
| 32 | isa => 'Bool', | ||||||||||
| 33 | remote_name => 'ignoreCVResult', | ||||||||||
| 34 | predicate => 'has_ignore_cv_result', | ||||||||||
| 35 | traits => ['SetOnce'], | ||||||||||
| 36 | is => 'rw', | ||||||||||
| 37 | serializer => $true_false, | ||||||||||
| 38 | ); | ||||||||||
| 39 | |||||||||||
| 40 | 2 | has ignore_dav_result => ( | |||||||||
| 41 | isa => 'Bool', | ||||||||||
| 42 | remote_name => 'ignoreDAVResult', | ||||||||||
| 43 | predicate => 'has_ignore_dav_result', | ||||||||||
| 44 | traits => ['SetOnce'], | ||||||||||
| 45 | is => 'rw', | ||||||||||
| 46 | serializer => $true_false, | ||||||||||
| 47 | ); | ||||||||||
| 48 | |||||||||||
| 49 | 2 | has ignore_export_result => ( | |||||||||
| 50 | isa => 'Bool', | ||||||||||
| 51 | remote_name => 'ignoreExportResult', | ||||||||||
| 52 | predicate => 'has_ignore_export_result', | ||||||||||
| 53 | traits => ['SetOnce'], | ||||||||||
| 54 | is => 'rw', | ||||||||||
| 55 | serializer => $true_false, | ||||||||||
| 56 | ); | ||||||||||
| 57 | |||||||||||
| 58 | 2 | has ignore_validate_result => ( | |||||||||
| 59 | isa => 'Bool', | ||||||||||
| 60 | remote_name => 'ignoreValidateResult', | ||||||||||
| 61 | predicate => 'has_ignore_validate_result', | ||||||||||
| 62 | traits => ['SetOnce'], | ||||||||||
| 63 | is => 'rw', | ||||||||||
| 64 | serializer => $true_false, | ||||||||||
| 65 | ); | ||||||||||
| 66 | |||||||||||
| 67 | has decline_avs_flags => ( | ||||||||||
| 68 | isa => ArrayRef[AVSResult], | ||||||||||
| 69 | remote_name => 'declineAVSFlags', | ||||||||||
| 70 | predicate => 'has_decline_avs_flags', | ||||||||||
| 71 | is => 'rw', | ||||||||||
| 72 | traits => ['Array'], | ||||||||||
| 73 | serializer => sub { | ||||||||||
| 74 | 1 | ▶ | my ( $attr, $instance ) = @_; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 75 | 1 | return join ' ', @{ $attr->get_value( $instance ) }; | |||||||||
| 76 | }, | ||||||||||
| 77 | 2 | ); | |||||||||
| 78 | |||||||||||
| 79 | 2 | has score_threshold => ( | |||||||||
| 80 | isa => NumericCode, | ||||||||||
| 81 | remote_name => 'scoreThreshold', | ||||||||||
| 82 | predicate => 'has_score_threshold', | ||||||||||
| 83 | traits => ['SetOnce'], | ||||||||||
| 84 | is => 'rw', | ||||||||||
| 85 | ); | ||||||||||
| 86 | |||||||||||
| 87 | 2 | __PACKAGE__->meta->make_immutable; | |||||||||
| 88 | 2 | 1; | |||||||||
| 89 | |||||||||||
| 90 | # ABSTRACT: Business Rules | ||||||||||
| 91 | |||||||||||
| 92 | __END__ | ||||||||||
| 93 | |||||||||||
| 94 | =pod | ||||||||||
| 95 | |||||||||||
| 96 | =encoding UTF-8 | ||||||||||
| 97 | |||||||||||
| 98 | =head1 NAME | ||||||||||
| 99 | |||||||||||
| 100 | Business::CyberSource::RequestPart::BusinessRules - Business Rules | ||||||||||
| 101 | |||||||||||
| 102 | =head1 VERSION | ||||||||||
| 103 | |||||||||||
| 104 | version 0.010007 | ||||||||||
| 105 | |||||||||||
| 106 | =head1 EXTENDS | ||||||||||
| 107 | |||||||||||
| 108 | L<Business::CyberSource::MessagePart> | ||||||||||
| 109 | |||||||||||
| 110 | =head1 ATTRIBUTES | ||||||||||
| 111 | |||||||||||
| 112 | =head2 ignore_avs_result | ||||||||||
| 113 | |||||||||||
| 114 | Boolean that indicates whether to allow C<ccCaptureService> to run even when the | ||||||||||
| 115 | authorization receives an AVS decline. Used only when both C<ccAuthService> and | ||||||||||
| 116 | C<ccCaptureService> are requested at the same time. | ||||||||||
| 117 | Possible values: | ||||||||||
| 118 | |||||||||||
| 119 | =over | ||||||||||
| 120 | |||||||||||
| 121 | =item true | ||||||||||
| 122 | |||||||||||
| 123 | Ignore the results of AVS checking and run the C<ccCaptureService> service. | ||||||||||
| 124 | |||||||||||
| 125 | =item false (default on remote) | ||||||||||
| 126 | |||||||||||
| 127 | If the authorization receives an AVS decline, do not run the | ||||||||||
| 128 | C<ccCaptureService> service. | ||||||||||
| 129 | |||||||||||
| 130 | =back | ||||||||||
| 131 | |||||||||||
| 132 | If the value of this field is true, the list in the | ||||||||||
| 133 | businessRules_declineAVSFlags field is ignored. | ||||||||||
| 134 | |||||||||||
| 135 | =head2 ignore_cv_result | ||||||||||
| 136 | |||||||||||
| 137 | Flag that indicates whether to allow C<ccCaptureService> to run if the value of | ||||||||||
| 138 | the reply field C<ccAuthReply_cvCode> is D or N. Used only when both | ||||||||||
| 139 | C<ccAuthService> | ||||||||||
| 140 | and C<ccCaptureService> are requested at the same time. | ||||||||||
| 141 | Possible values: | ||||||||||
| 142 | |||||||||||
| 143 | =over | ||||||||||
| 144 | |||||||||||
| 145 | =item true | ||||||||||
| 146 | |||||||||||
| 147 | If the value of C<ccAuthReply_cvCode> is D or N, allow C<ccCaptureService> to | ||||||||||
| 148 | run. | ||||||||||
| 149 | |||||||||||
| 150 | =item false (default on remote) | ||||||||||
| 151 | |||||||||||
| 152 | If the value of C<ccAuthReply_cvCode> is D or N, return a card | ||||||||||
| 153 | verification decline and do not allow C<ccCaptureService> to run. | ||||||||||
| 154 | |||||||||||
| 155 | =back | ||||||||||
| 156 | |||||||||||
| 157 | =head2 ignore_dav_result | ||||||||||
| 158 | |||||||||||
| 159 | =head2 ignore_export_result | ||||||||||
| 160 | |||||||||||
| 161 | =head2 ignore_validate_result | ||||||||||
| 162 | |||||||||||
| 163 | =head2 decline_avs_flags | ||||||||||
| 164 | |||||||||||
| 165 | ArrayRef of AVS flags that cause the request to be declined for AVS reasons. | ||||||||||
| 166 | |||||||||||
| 167 | B<Important> Make sure that you include the value N in the list if you want to | ||||||||||
| 168 | receive declines for the AVS code N. | ||||||||||
| 169 | |||||||||||
| 170 | =head2 score_threshold | ||||||||||
| 171 | |||||||||||
| 172 | =head1 BUGS | ||||||||||
| 173 | |||||||||||
| 174 | Please report any bugs or feature requests on the bugtracker website | ||||||||||
| 175 | https://github.com/xenoterracide/business-cybersource/issues | ||||||||||
| 176 | |||||||||||
| 177 | When submitting a bug or request, please include a test-file or a | ||||||||||
| 178 | patch to an existing test-file that illustrates the bug or desired | ||||||||||
| 179 | feature. | ||||||||||
| 180 | |||||||||||
| 181 | =head1 AUTHOR | ||||||||||
| 182 | |||||||||||
| 183 | Caleb Cushing <xenoterracide@gmail.com> | ||||||||||
| 184 | |||||||||||
| 185 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 186 | |||||||||||
| 187 | This software is Copyright (c) 2016 by Caleb Cushing <xenoterracide@gmail.com>. | ||||||||||
| 188 | |||||||||||
| 189 | This is free software, licensed under: | ||||||||||
| 190 | |||||||||||
| 191 | The Artistic License 2.0 (GPL Compatible) | ||||||||||
| 192 | |||||||||||
| 193 | =cut | ||||||||||