[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#828630: marked as done (jessie-pu: package libbusiness-creditcard-perl/0.33-1+deb8u1)



Your message dated Sat, 17 Sep 2016 13:08:06 +0100
with message-id <1474114086.2011.126.camel@adam-barratt.org.uk>
and subject line Closing p-u bugs for updates in 8.6
has caused the Debian Bug report #828630,
regarding jessie-pu: package libbusiness-creditcard-perl/0.33-1+deb8u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
828630: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=828630
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I've prepared an update for libbusiness-creditcard-perl in
jessie{,-updates} which fixes #814479 for stable users. The issue at
hand is that the credit card ranges of several providers need to be
updated.

In practice there are several options to do this update in stable:
- - What I've prepared (attached as a debdiff) for now is to backport
  the functional and some documentation changes from 0.34 and 0.35 to
  0.33 in 3 logically separate quilt patches, in order to make
  reviewing easy. In practice this leaves out only some minor changes
  in metadata and unrelated documentation changes from 0.35.
- - Ivan (upstream and Debian contributor) originally asked to take
  the 0.35 release and upload it to stable (presumably as
  0.35-0+deb8u1). This had the advantage of shipping a fully tested
  release but is probably not the release team's typically preferred
  way. -- Complete diff:
  https://metacpan.org/diff/file?target=IVAN%2FBusiness-CreditCard-0.35%2F&source=IVAN%2FBusiness-CreditCard-0.33%2F
- - In regard to my patch series, Ivan pointed out in #814479 that we
  might as well change $VERSION in the code to 0.35 since that's
  what it functionally is.

I'm fine with all of these versions (and I'm happy to prepare
debdiffs for the second and the third in case you prefer them);
please advice on your preferred way of proceeding.


Cheers,
gregor

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQJ8BAEBCgBmBQJXb9QuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREMUUxMzE2RTkzQTc2MEE4MTA0RDg1RkFC
QjNBNjgwMTg2NDlBQTA2AAoJELs6aAGGSaoGDa4P+wS+Mbzuwqi0W2uxAe5sVLid
2J7KARfvBynDwPQQBCl8GXW5mtpmpHHwSkdSku3g0M2KJTHyyWSNppvjTOWxKlgF
3McUUGkxOVik1ZqV3OMd9kFPJ9/ezp9L8WazkvCT5Z6F9gFR+TYSNLg6up108hr9
/deT+r7l0nxbkKgS7UV4ql//+VRCWxzTp5zf7V85AvEXfwukXp8oIQ0GORhIcVvW
yS/ZmAZYjXUNb4mEzxHqJ8XIlzcHSIYIYB/oC+Km25qLEmXTHG/hdv2AcRQ91+1E
nSczegDtku8RkzAgZ1veU7N5yCTzwgPHrtdCzipYE/xjb95dl/VLOHg+qFES4Hvl
EMtNUYKZxzsdBFZN+AqNL+z1OM32BDeVEscp3ukZyJwmVG2034ikkcuTiiq5CVqq
fE5cX+5NQMW1eVfuxjE7C0CTusJJmav/Q9PxdVRSNWUXlpybYgd8oYrpKtt4WlcW
kME61QKByiv1olUOs7ymyRxgu9xHZSo4kyMVQs12bZs7CWr3uylsAfXBWm9J5b72
i/BbtZiItIEpVCYEeeX7GH2L4l45rNNJOQ3sUNY/6ko3gz0LbuvZXvOSCsl7oCEW
DdyzHEMvC3IrgYvLRpXXtsphQSpkpMFi4axAP9fqSfj5Q5dcRSn5LtCr1VSxcI5l
MzrXdUIr5kIMUmUPtwvq
=5HrC
-----END PGP SIGNATURE-----
diff -Nru libbusiness-creditcard-perl-0.33/debian/changelog libbusiness-creditcard-perl-0.33/debian/changelog
--- libbusiness-creditcard-perl-0.33/debian/changelog	2016-06-26 14:52:12.000000000 +0200
+++ libbusiness-creditcard-perl-0.33/debian/changelog	2016-06-26 14:51:25.000000000 +0200
@@ -1,3 +1,19 @@
+libbusiness-creditcard-perl (0.33-1+deb8u1) UNRELEASED; urgency=medium
+
+  * Backport changes from upstream releases 0.34 and 0.35 to adjust to
+    changes in credit card ranges and processing of various companies.
+
+    Add the following patches:
+    - ranges.patch: adjust credit card number ranges
+    - receipt_cardtype.patch: add new function for new Discover receipt
+      requirements
+    - docs.patch: update documentation about processing of different cards in
+      various countries
+
+    (Closes: #814479)
+
+ -- gregor herrmann <gregoa@debian.org>  Tue, 07 Jun 2016 21:58:27 +0200
+
 libbusiness-creditcard-perl (0.33-1) unstable; urgency=medium
 
   * Team upload.
diff -Nru libbusiness-creditcard-perl-0.33/debian/patches/docs.patch libbusiness-creditcard-perl-0.33/debian/patches/docs.patch
--- libbusiness-creditcard-perl-0.33/debian/patches/docs.patch	1970-01-01 01:00:00.000000000 +0100
+++ libbusiness-creditcard-perl-0.33/debian/patches/docs.patch	2016-06-26 14:51:25.000000000 +0200
@@ -0,0 +1,30 @@
+Description: Update POD to document mapping between card ranges and countries.
+Origin: https://metacpan.org/release/Business-CreditCard, 0.34/0.35
+Bug-Debian: https://bugs.debian.org/814479
+Author: Ivan Kohler <ivan-debian@420.am>
+Reviewed-by: gregor herrmann <gregoa@debian.org>
+Last-Update: 2016-06-07
+
+--- a/CreditCard.pm
++++ b/CreditCard.pm
+@@ -83,7 +83,7 @@
+ other networks, in which one type of card is processed as another card type.
+ 
+ By default, Business::CreditCard returns the type the card should be treated as
+-in the US and Canada.  You can change this to return the type the card should
++in the US.  You can change this to return the type the card should
+ be treated as in a different country by setting
+ C<$Business::CreditCard::Country> to your two-letter country code.  This
+ is probably what you want to determine if you accept the card, or which
+@@ -99,9 +99,9 @@
+ 
+ =item Most Diner's club is now identified as Discover.  (This supercedes the earlier identification of some Diner's club cards as MasterCard inside the US and Canada.)
+ 
+-=item JCB cards in the 3528-3589 range are identified as Discover inside the US and Canada.
++=item JCB cards in the 3528-3589 range are identified as Discover inside the US and territories.
+ 
+-=item China Union Pay cards are identified as Discover cards outside China.
++=item China Union Pay cards are identified as Discover cards in the US, Mexico and most Caribbean countries.
+ 
+ =back
+ 
diff -Nru libbusiness-creditcard-perl-0.33/debian/patches/ranges.patch libbusiness-creditcard-perl-0.33/debian/patches/ranges.patch
--- libbusiness-creditcard-perl-0.33/debian/patches/ranges.patch	1970-01-01 01:00:00.000000000 +0100
+++ libbusiness-creditcard-perl-0.33/debian/patches/ranges.patch	2016-06-26 14:51:25.000000000 +0200
@@ -0,0 +1,162 @@
+Description: Update credit card ranges.
+Origin: https://metacpan.org/release/Business-CreditCard, 0.34/0.35
+Bug-Debian: https://bugs.debian.org/814479
+Author: Ivan Kohler <ivan-debian@420.am>
+Reviewed-by: gregor herrmann <gregoa@debian.org>
+Last-Update: 2016-06-07
+
+--- a/CreditCard.pm
++++ b/CreditCard.pm
+@@ -194,30 +194,32 @@
+             && 0+$number;
+     }
+ 
+-    return "VISA card" if $number =~ /^4[0-8][\dx]{11}([\dx]{3})?$/o;
++    return "VISA card" if $number =~ /^4[0-8][\dx]{11,17}$/o;
+ 
+     return "MasterCard"
+-      if   $number =~ /^5[1-5][\dx]{14}$/o
+-      ;# || ( $number =~ /^36[\dx]{12}/ && $Country =~ /^(US|CA)$/oi );
++      if $number =~ /^5[1-5][\dx]{14}$/o
++      || $number =~ /^2 ( 22[1-9] | 2[3-9][\dx] | [3-6][\dx]{2} | 7[0-1][\dx] | 720 ) [\dx]{12}$/xo
++      || $number =~ /^2[2-7]xx[\dx]{12}$/o;
+ 
+     return "American Express card" if $number =~ /^3[47][\dx]{13}$/o;
+ 
+     return "Discover card"
+-      if   $number =~ /^30[0-5][\dx]{11}([\dx]{2})?$/o  #diner's: 300-305
+-      ||   $number =~ /^3095[\dx]{10}([\dx]{2})?$/o     #diner's: 3095
+-      ||   $number =~ /^3[689][\dx]{12}([\dx]{2})?$/o   #diner's: 36 38 and 39
+-      ||   $number =~ /^6011[\dx]{12}$/o
+-      ||   $number =~ /^64[4-9][\dx]{13}$/o
+-      ||   $number =~ /^65[\dx]{14}$/o
+-      || ( $number =~ /^62[24-68][\dx]{13}$/o && uc($Country) ne 'CN' ) #CUP
+-      || ( $number =~ /^35(2[89]|[3-8][\dx])[\dx]{12}$/o && $Country =~ /^(US|CA)$/oi ); #JCB cards in the 3528-3589 range are identified as Discover inside the US and Canada
++      if   $number =~ /^30[0-5][\dx]{13,16}$/o #diner's: 300-305
++      ||   $number =~ /^3095[\dx]{12}$/o       #diner's: 3095
++      ||   $number =~ /^36[\dx]{12,17}$/o      #diner's: 36
++      ||   $number =~ /^3[89][\dx]{14,17}$/o   #diner's: 38 and 39
++      ||   $number =~ /^6011[\dx]{12,15}$/o
++      ||   $number =~ /^64[4-9][\dx]{13,16}$/o
++      ||   $number =~ /^65[\dx]{14,17}$/o
++      || ( $number =~ /^62[24-68][\dx]{13,16}$/o && $Country =~ /^(US|MX|AI|AG|AW|BS|BB|BM|BQ|VG|KY|CW|DM|DO|GD|GP|JM|MQ|MS|BL|KN|LC|VC|MF|SX|TT|TC)$/oi ) #China Union Pay identified as Discover in US, Mexico and Caribbean
++      || ( $number =~ /^35(2[89]|[3-8][\dx])[\dx]{12,15}$/o && $Country =~ /^(US|PR|VI|MP|PW|GU)$/oi ); #JCB cards in the 3528-3589 range are identified as Discover in US, Puerto Rico, US Virgin Islands, Northern Mariana Islands, Palau and Guam
+ 
+     return "Switch"
+       if $number =~ /^49(03(0[2-9]|3[5-9])|11(0[1-2]|7[4-9]|8[1-2])|36[0-9]{2})[\dx]{10}([\dx]{2,3})?$/o
+       || $number =~ /^564182[\dx]{10}([\dx]{2,3})?$/o
+       || $number =~ /^6(3(33[0-4][0-9])|759[0-9]{2})[\dx]{10}([\dx]{2,3})?$/o;
+     #redunant with above, catch 49* that's not Switch
+-    return "VISA card" if $number =~ /^4[\dx]{12}([\dx]{3})?$/o;
++    return "VISA card" if $number =~ /^4[\dx]{12,18}$/o;
+ 
+     #return "Diner's Club/Carte Blanche"
+     #  if $number =~ /^3(0[0-59]|[68][\dx])[\dx]{11}$/o;
+--- a/t/agreements.t
++++ b/t/agreements.t
+@@ -15,9 +15,9 @@
+   my %cards = (
+   '3528000000000007' => 'Discover card',
+   '3589000000000003' => 'Discover card',
+-  '30000000000004'   => 'Discover card',
+-  '30500000000003'   => 'Discover card',
+-  '30950000000000'   => 'Discover card',
++#  '30000000000004'   => 'Discover card',
++#  '30500000000003'   => 'Discover card',
++#  '30950000000000'   => 'Discover card',
+   #'6200000000000005' => 'Discover card', #is 620 a valid CUP now?
+   '6220000000000008' => 'Discover card',
+   );
+@@ -40,14 +40,23 @@
+ sub test_card_id_ca {
+   local($Business::CreditCard::Country) = 'CA';
+ 
++#  my %cards = (
++#  '3528000000000007' => 'Discover card',
++#  '3589000000000003' => 'Discover card',
++##  '30000000000004'   => 'Discover card',
++##  '30500000000003'   => 'Discover card',
++##  '30950000000000'   => 'Discover card',
++#  #'6200000000000005' => 'Discover card', #is 620 a valid CUP now?
++#  '6220000000000008' => 'Discover card',
++#  );
+   my %cards = (
+-  '3528000000000007' => 'Discover card',
+-  '3589000000000003' => 'Discover card',
+-  '30000000000004'   => 'Discover card',
+-  '30500000000003'   => 'Discover card',
+-  '30950000000000'   => 'Discover card',
++  '3528000000000007' => 'JCB',
++  '3589000000000003' => 'JCB',
++#  '30000000000004'   => 'Discover card',
++#  '30500000000003'   => 'Discover card',
++#  '30950000000000'   => 'Discover card',
+   #'6200000000000005' => 'Discover card', #is 620 a valid CUP now?
+-  '6220000000000008' => 'Discover card',
++  '6220000000000008' => 'China Union Pay',
+   );
+   test_cards(\%cards);
+ }
+@@ -59,9 +68,9 @@
+   my %cards = (
+   '3528000000000007' => 'JCB',
+   '3589000000000003' => 'JCB',
+-  '30000000000004'   => 'Discover card',
+-  '30500000000003'   => 'Discover card',
+-  '30950000000000'   => 'Discover card',
++#  '30000000000004'   => 'Discover card',
++#  '30500000000003'   => 'Discover card',
++#  '30950000000000'   => 'Discover card',
+   #'6200000000000005' => 'Discover card', #is 620 a valid CUP now?
+   '6220000000000008' => 'Discover card',
+   );
+@@ -74,9 +83,9 @@
+   my %cards = (
+   '3528000000000007' => 'JCB',
+   '3589000000000003' => 'JCB',
+-  '30000000000004'   => 'Discover card',
+-  '30500000000003'   => 'Discover card',
+-  '30950000000000'   => 'Discover card',
++#  '30000000000004'   => 'Discover card',
++#  '30500000000003'   => 'Discover card',
++#  '30950000000000'   => 'Discover card',
+   #'6200000000000005' => 'Discover card', #is 620 a valid CUP now?
+   '6220000000000008' => 'China Union Pay',
+   );
+@@ -89,9 +98,9 @@
+   my %cards = (
+   '3528000000000007' => 'JCB',
+   '3589000000000003' => 'JCB',
+-  '30000000000004'   => 'Discover card',
+-  '30500000000003'   => 'Discover card',
+-  '30950000000000'   => 'Discover card',
++#  '30000000000004'   => 'Discover card',
++#  '30500000000003'   => 'Discover card',
++#  '30950000000000'   => 'Discover card',
+   #'6200000000000005' => 'Discover card', #is 620 a valid CUP now?
+ 
+   #XXX this is technically an issue ("base" for CUP is still CUP)
+--- a/t/test.t
++++ b/t/test.t
+@@ -13,19 +13,15 @@
+         my %test_table=(
+                 '5212345678901234' =>   'MasterCard',
+                 '5512345678901234' =>   'MasterCard',
++                '2512345678901234' => 'MasterCard',
+                 '4123456789012' =>      'VISA card',
++                '4929492492497' =>      'VISA card',
+                 '4512345678901234' =>   'VISA card',
+                 '341234567890123' =>    'American Express card',
+                 '371234567890123' =>    'American Express card',
+-                #'30112345678901' =>     "Diner's Club/Carte Blanche",
+-                '30112345678901' =>     'Discover card',
+-                #'30512345678901' =>     "Diner's Club/Carte Blanche",
+-                '30512345678901' =>     'Discover card',
+                 #'36123456789012' =>     "Diner's Club/Carte Blanche",
+                 #'36123456789012' =>     'MasterCard',
+                 '36123456789012' =>     'Discover card',
+-                #'38123456789012' =>     "Diner's Club/Carte Blanche",
+-                '38123456789012' =>     'Discover card',
+                 '201412345678901' =>    'enRoute',
+                 '214912345678901' =>    'enRoute',
+                 '6011123456789012' =>   'Discover card',
diff -Nru libbusiness-creditcard-perl-0.33/debian/patches/receipt_cardtype.patch libbusiness-creditcard-perl-0.33/debian/patches/receipt_cardtype.patch
--- libbusiness-creditcard-perl-0.33/debian/patches/receipt_cardtype.patch	1970-01-01 01:00:00.000000000 +0100
+++ libbusiness-creditcard-perl-0.33/debian/patches/receipt_cardtype.patch	2016-06-26 14:51:25.000000000 +0200
@@ -0,0 +1,46 @@
+Description: Add function receipt_cardtype().
+ Needed for some Discover cards, as explained in the POD below.
+Origin: https://metacpan.org/release/Business-CreditCard, 0.34/0.35
+Bug-Debian: https://bugs.debian.org/814479
+Author: Ivan Kohler <ivan-debian@420.am>
+Reviewed-by: gregor herrmann <gregoa@debian.org>
+Last-Update: 2016-06-07
+
+--- a/CreditCard.pm
++++ b/CreditCard.pm
+@@ -105,6 +105,13 @@
+ 
+ =back
+ 
++=head1 RECEIPT REQUIREMENTS
++
++Discover requires some cards processed on its network to display "PayPal"
++on receipts instead of "Discover".  The receipt_cardtype() subroutine will
++return "PayPal card" for these cards only, and otherwise the same output as
++cardtype().
++
+ =head1 NOTE ON INTENDED PURPOSE
+ 
+ This module is for verifying I<real world> B<credit cards>.  It is B<NOT> a
+@@ -246,6 +253,21 @@
+     return "Unknown";
+ }
+ 
++sub receipt_cardtype {
++    # Allow use as a class method
++    shift if UNIVERSAL::isa( $_[0], 'Business::CreditCard' );
++
++    my ($number) = @_;
++
++    $number =~ s/[\s\-]//go;
++    $number =~ s/[x\*\.\_]/x/gio;
++
++    #ref Discover IIN Bulletin Feb 2015_021715
++    return "PayPal card" if $number =~ /^6(01104|506[01]0)[\dx]{10,13}$/o;
++
++    cardtype($number);
++}
++
+ sub generate_last_digit {
+     # Allow use as a class method
+     shift if UNIVERSAL::isa( $_[0], 'Business::CreditCard' );
diff -Nru libbusiness-creditcard-perl-0.33/debian/patches/series libbusiness-creditcard-perl-0.33/debian/patches/series
--- libbusiness-creditcard-perl-0.33/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libbusiness-creditcard-perl-0.33/debian/patches/series	2016-06-26 14:51:25.000000000 +0200
@@ -0,0 +1,3 @@
+ranges.patch
+receipt_cardtype.patch
+docs.patch

--- End Message ---
--- Begin Message ---
Version: 8.6

The updates referred to in each of these bugs were included in today's
stable point release.

Regards,

Adam

--- End Message ---

Reply to: