[ic] duplicate suppression

Bill Carr interchange-users@interchange.redhat.com
Mon Jun 3 17:34:36 2002


--=-tZmEzq+VZfarocoMvI9G
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

This is from a while back. I lost the thread.

Here is the changes I made to Payment/Signio.pm to issue a warning
message for a duplicate charge. For my application I want to be warned
if the same card is charged the same amount on the same day. VeriSign
has to enable duplicate suppression for your account for this to work.
If the duplicate flag is set the charge will still go through. This just
sends a message to the same place as the orders go to say 'Hey,
something might not be right here. Check it out.'

-- 
Bill Carr
Worldwide Impact
bill@worldwideimpact.com
413-253-6700

--=-tZmEzq+VZfarocoMvI9G
Content-Disposition: attachment; filename=signio.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=signio.patch; charset=ISO-8859-1

--- interchange.orig/lib/Vend/Payment/Signio.pm	Thu Jan 24 00:07:03 2002
+++ interchange/lib/Vend/Payment/Signio.pm	Mon Jun  3 17:00:54 2002
@@ -368,12 +368,14 @@
         /
     );
=20
+    my $dsguid =3D $actual{mv_credit_card_number}.$amount.POSIX::strftime(=
"%y%m%d", localtime(time));
     my %query =3D (
                     AMT         =3D> $amount,
                     SHIPTOZIP   =3D> $actual{zip},
                     EXPDATE     =3D> $exp,
                     TENDER      =3D> 'C',
                     ORIGID      =3D> $orderID,
+                    DSGUID      =3D> $dsguid,
                     PWD         =3D> $secret,
                     USER        =3D> $user,
 					TRXTYPE		=3D> $transtype,
@@ -462,6 +464,9 @@
 		$result{MErrMsg} =3D $result{'pop.error-message'} =3D $msg;
     }
     else {
+	if ($result{DUPLICATE}) {
+	   Vend::Util::send_mail($Vend::Cfg->{MailOrderTo}, 'Possible duplicate c=
harge', qq{Please check transaction id $result{PNREF} for a possible duplic=
ate charge.});
+	}
         $result{ICSTATUS} =3D 'success';
     }
=20

--=-tZmEzq+VZfarocoMvI9G--