[ic] CVV2 payflow pro
Joshua Lavin
joshua at kingdomdesign.com
Fri Sep 26 10:46:32 EDT 2003
On Friday, September 26, 2003, at 08:18 AM, Aaron Rubin wrote:
> Has anyone added CVV2 functionality to the payflowpro module? If so,
> would
> you mind sharing?
>
> --
> Aaron
Hi Aaron,
Here's what I did. I don't use CVV2 anymore, and these are all backups,
so I don't know if these files have changed. I think Payment.pm has to
be modified too, but I don't have that backup.
At least when I did it, I couldn't fail a transaction if the CVV2
didn't match, so I returned a fake error, which means I had to credit
or void them because it went through anyways. It was too much hassle.
Josh
pages/ord/checkout.html:
--
add:
[error name=mv_credit_card_cvv2 std_label="Card Security Code"
required=1]
<INPUT TYPE=text NAME=mv_credit_card_cvv2 SIZE=5 maxlength="5">
--
etc/profiles.order:
--
after: email=email
add: mv_credit_card_cvv2=required
--
[interchange dir]/lib/Vend/Payment/Signio.pm:
--
after: TRXTYPE => $transtype,
add: CVV2 => $actual{mv_credit_card_cvv2},
after: pop.avs_addr AVSADDR
add/modify: cvs_resp CVV2MATCH
/
);
my %result = split /[&=]/, $result;
my $decline = $result{RESULT};
$cvv2 = $result{CVV2MATCH};
chomp ($cvv2);
if ($decline) {
$decline = $decline >> 8;
$result{ICSTATUS} = 'failed';
my $msg = errmsg("Charge error: %s Reason: %s. Please call
in your order or try again.",
$result{RESULT} ,
$result{RESPMSG},
);
$result{MErrMsg} = $result{'pop.error-message'} = $msg;
}
elsif ($cvv2 eq "N") { // give fake error to pretend failure
$result{ICSTATUS} = 'failed';
my $msg = errmsg("Charge error: 262. Please call in your
order or try again.",
$result{RESULT} ,
$result{RESPMSG},
);
$result{MErrMsg} = $result{'pop.error-message'} = $msg;
}
else {
$result{ICSTATUS} = 'success';
}
--
More information about the interchange-users
mailing list