{"action":"created","issue":{"url":"https://api.github.com/repos/bendrucker/creditcards-types/issues/13","repository_url":"https://api.github.com/repos/bendrucker/creditcards-types","labels_url":"https://api.github.com/repos/bendrucker/creditcards-types/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/bendrucker/creditcards-types/issues/13/comments","events_url":"https://api.github.com/repos/bendrucker/creditcards-types/issues/13/events","html_url":"https://github.com/bendrucker/creditcards-types/issues/13","id":159438769,"number":13,"title":"Discover test numbers matching as Maestro cards","user":{"login":"matt-zangen","id":9702364,"avatar_url":"https://avatars.githubusercontent.com/u/9702364?v=3","gravatar_id":"","url":"https://api.github.com/users/matt-zangen","html_url":"https://github.com/matt-zangen","followers_url":"https://api.github.com/users/matt-zangen/followers","following_url":"https://api.github.com/users/matt-zangen/following{/other_user}","gists_url":"https://api.github.com/users/matt-zangen/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-zangen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-zangen/subscriptions","organizations_url":"https://api.github.com/users/matt-zangen/orgs","repos_url":"https://api.github.com/users/matt-zangen/repos","events_url":"https://api.github.com/users/matt-zangen/events{/privacy}","received_events_url":"https://api.github.com/users/matt-zangen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-09T15:34:43Z","updated_at":"2016-06-09T15:51:50Z","closed_at":"2016-06-09T15:51:50Z","body":"A common example of a Discover card number used in testing is 6011111111111117 as can be seen on a few major card processor docs:\r\n\r\nhttps://stripe.com/docs/testing#cards\r\nhttps://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm\r\n\r\nA regex test of the Discover type's pattern and eager pattern do not match for this number:\r\n\r\nEager: https://regex101.com/r/aH5jP1/1\r\nPattern: https://regex101.com/r/zW5oM2/1\r\n\r\nThese numbers do match on the Maestro type, however:\r\n\r\nEager: https://regex101.com/r/mN1qO2/1\r\nPattern: https://regex101.com/r/rJ9lD8/1\r\n\r\nThe other test number listed, 6011000990139424 , does match as Discover and not Maestro.\r\n\r\nI'm not sure if it's the number that is incorrect, or the pattern, but this got flagged by QA since the first test number failed validation when excluding the Maestro type.\r\n\r\nMy workaround was to allow the Maestro type, but display the type as Discover via icon. Not ideal since it lacks Discover formatting, and when it's actually a Maestro card will be accepted by the front-end only to be rejected by the payment processor, but it works in the meantime.\r\n\r\nI'm using angular-credit-cards, but it seems unrelated."},"comment":{"url":"https://api.github.com/repos/bendrucker/creditcards-types/issues/comments/224939084","html_url":"https://github.com/bendrucker/creditcards-types/issues/13#issuecomment-224939084","issue_url":"https://api.github.com/repos/bendrucker/creditcards-types/issues/13","id":224939084,"user":{"login":"bendrucker","id":808808,"avatar_url":"https://avatars.githubusercontent.com/u/808808?v=3","gravatar_id":"","url":"https://api.github.com/users/bendrucker","html_url":"https://github.com/bendrucker","followers_url":"https://api.github.com/users/bendrucker/followers","following_url":"https://api.github.com/users/bendrucker/following{/other_user}","gists_url":"https://api.github.com/users/bendrucker/gists{/gist_id}","starred_url":"https://api.github.com/users/bendrucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendrucker/subscriptions","organizations_url":"https://api.github.com/users/bendrucker/orgs","repos_url":"https://api.github.com/users/bendrucker/repos","events_url":"https://api.github.com/users/bendrucker/events{/privacy}","received_events_url":"https://api.github.com/users/bendrucker/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T15:51:50Z","updated_at":"2016-06-09T15:51:50Z","body":"It's a mystery to me why Stripe et al chose that one invalid card number (the one in question) and one valid (the second one).  It's very explicitly [not in Discover's documented range](https://www.discovernetwork.com/merchants/images/Merchant_Marketing.pdf) and does fall in the [Maestro docs](https://www.barclaycard.co.uk/business/files/Ranges-and-Rules-February-2016.pdf). Maestro occupies pretty much the whole 5/6 ranges, at least docs wise, with specific exclusions for MasterCard and Discover ranges.\r\n\r\nIn reality I don't think anyone actually issues in that specific range. Nevertheless, I've chosen to keep the creditcards-types validators tightly linked to available range docs."}}
{"actor":{"display_login":"bendrucker"}}