line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::OnlinePayment::PPIPayMover::CreditCardResponse;
|
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
31
|
use strict;
|
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
197
|
|
4
|
6
|
|
|
6
|
|
28
|
use vars qw(@ISA);
|
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
242
|
|
5
|
6
|
|
|
6
|
|
31
|
use Business::OnlinePayment::PPIPayMover::TransactionResponse;
|
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
143
|
|
6
|
6
|
|
|
6
|
|
3885
|
use Business::OnlinePayment::PPIPayMover::PayerAuthenticationResponse;
|
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
200
|
|
7
|
6
|
|
|
6
|
|
43
|
use Business::OnlinePayment::PPIPayMover::constants;
|
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
9249
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
@ISA = qw(Business::OnlinePayment::PPIPayMover::TransactionResponse);
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new {
|
12
|
0
|
|
|
0
|
0
|
|
my $class = shift;
|
13
|
0
|
|
|
|
|
|
my $InString = shift;
|
14
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new($InString);
|
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
$self->{oPayerAuthenticationResponse} = undef;
|
17
|
0
|
|
|
|
|
|
$self->{strReferenceId} = undef;
|
18
|
0
|
|
|
|
|
|
$self->{strBatchId} = undef;
|
19
|
0
|
|
|
|
|
|
$self->{strBankTransactionId} = undef;
|
20
|
0
|
|
|
|
|
|
$self->{strBankApprovalCode} = undef;
|
21
|
0
|
|
|
|
|
|
$self->{strState} = undef;
|
22
|
0
|
|
|
|
|
|
$self->{strAuthorizedAmount} = undef;
|
23
|
0
|
|
|
|
|
|
$self->{strOriginalAuthorizedAmount} = undef;
|
24
|
0
|
|
|
|
|
|
$self->{strCapturedAmount} = undef;
|
25
|
0
|
|
|
|
|
|
$self->{strCreditedAmount} = undef;
|
26
|
0
|
|
|
|
|
|
$self->{strTimeStampCreated} = undef;
|
27
|
0
|
|
|
|
|
|
$self->{strOrderId} = undef;
|
28
|
0
|
|
|
|
|
|
$self->{strIsoCode} = undef;
|
29
|
0
|
|
|
|
|
|
$self->{strAVSCode} = "None"; # v1.5
|
30
|
0
|
|
|
|
|
|
$self->{strCreditCardVerificationResponse} = undef;
|
31
|
|
|
|
|
|
|
|
32
|
0
|
0
|
0
|
|
|
|
if ($self->{iResponseCode} == TRANSACTION_SERVER_ERROR || $self->{iResponseCode} == INVALID_VERSION) {
|
33
|
0
|
|
|
|
|
|
return $self;
|
34
|
|
|
|
|
|
|
}
|
35
|
0
|
0
|
0
|
|
|
|
if (!($$InString) && !($self->{iResponseCode} == SUCCESSFUL_TRANSACTION)) {
|
36
|
0
|
|
|
|
|
|
return $self;
|
37
|
|
|
|
|
|
|
}
|
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my @temp = split(/\n/, $$InString);
|
40
|
0
|
|
|
|
|
|
my $size = @temp;
|
41
|
0
|
0
|
|
|
|
|
if ($size < 10) {
|
42
|
0
|
|
|
|
|
|
$self->{strError} .= "input string is in wrong format";
|
43
|
0
|
|
|
|
|
|
$self->{iRetVal} = 0;
|
44
|
0
|
|
|
|
|
|
return $self;
|
45
|
|
|
|
|
|
|
}
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# Looking to see if there is a nested Payer Authentication Response
|
48
|
0
|
|
|
|
|
|
my $payerAuthResponse = new Business::OnlinePayment::PPIPayMover::TransactionResponse($InString,AUTHENTICATION_PREFIX);
|
49
|
|
|
|
|
|
|
|
50
|
0
|
0
|
|
|
|
|
if (defined($payerAuthResponse->GetResponseCode)){
|
51
|
0
|
|
|
|
|
|
$self->{oPayerAuthenticationResponse} = new Business::OnlinePayment::PPIPayMover::PayerAuthenticationResponse($InString,AUTHENTICATION_PREFIX);
|
52
|
|
|
|
|
|
|
}
|
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
my $name;
|
55
|
|
|
|
|
|
|
my $value;
|
56
|
0
|
|
|
|
|
|
foreach (@temp) {
|
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
($name, $value) = split(/=/, $_, 2);
|
59
|
|
|
|
|
|
|
|
60
|
0
|
0
|
|
|
|
|
if ($name eq "capture_reference_id") {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
$self->{strReferenceId} = $value;
|
62
|
|
|
|
|
|
|
}
|
63
|
|
|
|
|
|
|
elsif ($name eq "order_id") {
|
64
|
0
|
|
|
|
|
|
$self->{strOrderId} = $value;
|
65
|
|
|
|
|
|
|
}
|
66
|
|
|
|
|
|
|
elsif ($name eq "iso_code") {
|
67
|
0
|
|
|
|
|
|
$self->{strIsoCode} = $value;
|
68
|
|
|
|
|
|
|
}
|
69
|
|
|
|
|
|
|
elsif ($name eq "bank_approval_code") {
|
70
|
0
|
|
|
|
|
|
$self->{strBankApprovalCode} = $value;
|
71
|
|
|
|
|
|
|
}
|
72
|
|
|
|
|
|
|
elsif ($name eq "state") {
|
73
|
0
|
|
|
|
|
|
$self->{strState} = $value;
|
74
|
|
|
|
|
|
|
}
|
75
|
|
|
|
|
|
|
elsif ($name eq "authorized_amount") {
|
76
|
0
|
|
|
|
|
|
$self->{strAuthorizedAmount} = $value;
|
77
|
|
|
|
|
|
|
}
|
78
|
|
|
|
|
|
|
elsif ($name eq "original_authorized_amount") {
|
79
|
0
|
|
|
|
|
|
$self->{strOriginalAuthorizedAmount} = $value;
|
80
|
|
|
|
|
|
|
}
|
81
|
|
|
|
|
|
|
elsif ($name eq "captured_amount") {
|
82
|
0
|
|
|
|
|
|
$self->{strCapturedAmount} = $value;
|
83
|
|
|
|
|
|
|
}
|
84
|
|
|
|
|
|
|
elsif ($name eq "credited_amount") {
|
85
|
0
|
|
|
|
|
|
$self->{strCreditedAmount} = $value;
|
86
|
|
|
|
|
|
|
}
|
87
|
|
|
|
|
|
|
elsif ($name eq "time_stamp_created") {
|
88
|
0
|
|
|
|
|
|
$self->{strTimeStampCreated} = $value;
|
89
|
|
|
|
|
|
|
}
|
90
|
|
|
|
|
|
|
elsif ($name eq "bank_transaction_id") {
|
91
|
0
|
|
|
|
|
|
$self->{strBankTransactionId} = $value;
|
92
|
|
|
|
|
|
|
}
|
93
|
|
|
|
|
|
|
elsif ($name eq "batch_id") {
|
94
|
0
|
|
|
|
|
|
$self->{strBatchId } = $value;
|
95
|
|
|
|
|
|
|
}
|
96
|
|
|
|
|
|
|
elsif ($name eq "avs_code") {
|
97
|
0
|
|
|
|
|
|
$self->{strAVSCode} = $value;
|
98
|
|
|
|
|
|
|
}
|
99
|
|
|
|
|
|
|
elsif ($name eq "credit_card_verification_response") {
|
100
|
0
|
|
|
|
|
|
$self->{strCreditCardVerificationResponse} = $value;
|
101
|
|
|
|
|
|
|
}
|
102
|
|
|
|
|
|
|
else {
|
103
|
0
|
|
|
|
|
|
$self->{strError} .= "Invalid data name: ";
|
104
|
|
|
|
|
|
|
}
|
105
|
|
|
|
|
|
|
}
|
106
|
0
|
|
|
|
|
|
return $self;
|
107
|
|
|
|
|
|
|
}
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
sub GetBatchId
|
111
|
|
|
|
|
|
|
{
|
112
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
113
|
0
|
|
|
|
|
|
$self->{strBatchId};
|
114
|
|
|
|
|
|
|
}
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
sub GetBankTransactionId
|
117
|
|
|
|
|
|
|
{
|
118
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
119
|
0
|
|
|
|
|
|
$self->{strBankTransactionId};
|
120
|
|
|
|
|
|
|
}
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
sub GetBankApprovalCode
|
123
|
|
|
|
|
|
|
{
|
124
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
125
|
0
|
|
|
|
|
|
$self->{strBankApprovalCode};
|
126
|
|
|
|
|
|
|
}
|
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
sub GetState
|
129
|
|
|
|
|
|
|
{
|
130
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
131
|
0
|
|
|
|
|
|
$self->{strState};
|
132
|
|
|
|
|
|
|
}
|
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
sub GetAuthorizedAmount
|
135
|
|
|
|
|
|
|
{
|
136
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
137
|
0
|
|
|
|
|
|
$self->{strAuthorizedAmount};
|
138
|
|
|
|
|
|
|
}
|
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
sub GetOriginalAuthorizedAmount
|
141
|
|
|
|
|
|
|
{
|
142
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
143
|
0
|
|
|
|
|
|
$self->{strOriginalAuthorizedAmount};
|
144
|
|
|
|
|
|
|
}
|
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
sub GetCapturedAmount
|
147
|
|
|
|
|
|
|
{
|
148
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
149
|
0
|
|
|
|
|
|
$self->{strCapturedAmount};
|
150
|
|
|
|
|
|
|
}
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
sub GetCreditedAmount
|
153
|
|
|
|
|
|
|
{
|
154
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
155
|
0
|
|
|
|
|
|
$self->{strCreditedAmount};
|
156
|
|
|
|
|
|
|
}
|
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
sub GetTimeStampCreated
|
159
|
|
|
|
|
|
|
{
|
160
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
161
|
0
|
|
|
|
|
|
$self->{strTimeStampCreated};
|
162
|
|
|
|
|
|
|
}
|
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
sub GetOrderId
|
165
|
|
|
|
|
|
|
{
|
166
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
167
|
0
|
|
|
|
|
|
$self->{strOrderId};
|
168
|
|
|
|
|
|
|
}
|
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub GetIsoCode
|
171
|
|
|
|
|
|
|
{
|
172
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
173
|
0
|
|
|
|
|
|
$self->{strIsoCode};
|
174
|
|
|
|
|
|
|
}
|
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub GetCaptureReferenceId
|
177
|
|
|
|
|
|
|
{
|
178
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
179
|
0
|
|
|
|
|
|
$self->{strReferenceId};
|
180
|
|
|
|
|
|
|
}
|
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
sub GetReferenceId
|
183
|
|
|
|
|
|
|
{
|
184
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
185
|
0
|
|
|
|
|
|
$self->{strReferenceId};
|
186
|
|
|
|
|
|
|
}
|
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
sub GetAVSCode {
|
189
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
190
|
0
|
|
|
|
|
|
$self->{strAVSCode};
|
191
|
|
|
|
|
|
|
}
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
sub GetCreditCardVerificationResponse {
|
194
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
195
|
0
|
|
|
|
|
|
$self->{strCreditCardVerificationResponse};
|
196
|
|
|
|
|
|
|
}
|
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
sub GetPayerAuthenticationResponse {
|
199
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
200
|
0
|
|
|
|
|
|
$self->{oPayerAuthenticationResponse};
|
201
|
|
|
|
|
|
|
}
|