credit-card

IDTech Unimag Card Swiper on Android

别来无恙 提交于 2019-11-30 12:09:03
I've been working on Android (v2.3) for a couple of weeks now, and I've stumbled upon some problems with the Unimag Card Swiper from IDTECH . The unit comes with a scarce documentation and the demo app from the SDK implements the firmware update and a few classes for dialogs and such which really offuscate how to achieve basic functionality (added to the few and not so good comments in the code). I have implemented the interface in a basic activity and tried to detect when the unit is connected or disconnected but it seems the listener catches both events (connection/disconnection) as

How to tell credit card's country of origin by its number?

*爱你&永不变心* 提交于 2019-11-30 11:50:23
I'm trying to develop an application, which would give access to different services for people from different regions of the world. Let's say, someone enters card number 1111-1111-1111-1111 . How do I use it to tell the country of origin? I know that this is possible, because paypal and apple do it. At first, I questioned whether this information could be gleened from the credit card number alone. Then I found it here: http://en.wikipedia.org/wiki/List_of_Bank_Identification_Numbers Edit - Don't forget about PCI Compliance if you are taking credit card numbers for payment. Edit - Apparently

Android: How to read Magnetic Stripe(credit cards, etc) Data [closed]

懵懂的女人 提交于 2019-11-30 10:48:37
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . The actual app is actually a web app but since my first impression is that there is no way to do this with a normal (android) web

Credit Card validation with Jquery

倾然丶 夕夏残阳落幕 提交于 2019-11-30 05:21:39
问题 I'm trying to validate credit card numbers with jQuery but i dont want to use the validation plugin , is there any other plugin for doing this? 回答1: http://en.wikipedia.org/wiki/Luhn_algorithm You could minimize this below into a very small footprint in your code. function isCreditCard( CC ) { if (CC.length > 19) return (false); sum = 0; mul = 1; l = CC.length; for (i = 0; i < l; i++) { digit = CC.substring(l-i-1,l-i); tproduct = parseInt(digit ,10)*mul; if (tproduct >= 10) sum += (tproduct %

Mobile-friendly input of a digits + spaces string (a credit card number)

柔情痞子 提交于 2019-11-30 03:25:13
问题 I have a credit card number input form that will be used by both mobile and non-mobile browsers. I want to hint that a keypad should appear on mobile, and to allow (optional) spaces, so either "4111 1234 1234 1234" or "4111123412341234" should be accepted. From what I've found, the options are: a) <input type="tel"/> - this seems to behave as I want (with current mobile browsers at least), but it's semantically wrong. b) <input type="text" pattern="[\d ]*"/> or similar - the iPhone recognises

Identify card type from card number [duplicate]

柔情痞子 提交于 2019-11-30 03:15:07
This question already has an answer here: How do you detect Credit card type based on number? 26 answers i have an array of card types that looks something like this var cards = new Array(); cards [0] = {name: "VISA", length: "13,16", prefixes: "4", checkdigit: true}; cards [1] = {name: "VISA_DELTA/ELECTRON", length: "16", prefixes: "417500,4917,4913", checkdigit: true}; however id like to be able to find the card type depending on the card number entered. e.g if they select their card type from a drop down list i.e visa, then the credit card number should start with 4 otherwise when they

Parse Credit Card input from Magnetic Stripe

我与影子孤独终老i 提交于 2019-11-29 22:22:58
Does anyone know how to parse a credit card string input from a Magnetic Card Swiper? I tried a JavaScript parser but never got it to work. This is what the input looks like. %BNNNNNNNNNNNNNNNN^DOE/JOHN ^1210201901000101000100061000000?;NNNNNNNNNNNNNNNN=12102019010106111001? The N's are the credit card number. See the Magnetic Stripe Card entry @ Wikipedia : Track one, Format B: Start sentinel — one character (generally '%') Format code="B" — one character (alpha only) Primary account number (PAN) — up to 19 characters. Usually, but not always, matches the credit card number printed on the

Android: How to read Magnetic Stripe(credit cards, etc) Data [closed]

大憨熊 提交于 2019-11-29 22:18:39
The actual app is actually a web app but since my first impression is that there is no way to do this with a normal (android) web browser right now, I figured this might be possible with a WebView. Are there card reader attachments out there that have APIs/SDKs for android? We have found a viable solution. MagTek offers a device that is similar with the one being used by SquareUp. The device is slightly larger and heavier but they offer SDKs for Android, iOS and Windows Phones. The android SDK can be found and downloaded here: http://www.magtek.com/support/software/programming_tools/ look for

Scanner for long integer, Exception in thread “main” java.util.InputMismatchException

穿精又带淫゛_ 提交于 2019-11-29 18:07:06
I am at the last step to finalize my program, however whenever I enter my integer (long) I get a input mismatch: Compiler message: "Exception in thread "main" java.util.InputMismatchException: For input string: "4388576018402626" at java.util.Scanner.nextInt(Scanner.java:2097) at java.util.Scanner.nextInt(Scanner.java:2050) at CreditCardValidation.main(CreditCardValidation.java:12)" My code is as follows: import java.util.Scanner ; //import Scanner public class CreditCardValidation { public static void main (String[] args){ Scanner kbd = new Scanner(System.in) ; System.out.println("Please

IDTech Unimag Card Swiper on Android

≯℡__Kan透↙ 提交于 2019-11-29 18:04:45
问题 I've been working on Android (v2.3) for a couple of weeks now, and I've stumbled upon some problems with the Unimag Card Swiper from IDTECH . The unit comes with a scarce documentation and the demo app from the SDK implements the firmware update and a few classes for dialogs and such which really offuscate how to achieve basic functionality (added to the few and not so good comments in the code). I have implemented the interface in a basic activity and tried to detect when the unit is