{"id":19039206,"url":"https://github.com/sualeh/magnetictrackparser","last_synced_at":"2025-04-05T11:07:54.171Z","repository":{"id":16509576,"uuid":"19262562","full_name":"sualeh/magnetictrackparser","owner":"sualeh","description":"Java library that can parse magnetic stripes from a bank issued credit card.","archived":false,"fork":false,"pushed_at":"2025-03-01T22:59:17.000Z","size":953,"stargazers_count":79,"open_issues_count":0,"forks_count":33,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-29T10:05:33.873Z","etag":null,"topics":["android","credit-card","java-library","payment-processing","payments"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sualeh.png","metadata":{"files":{"readme":".github/README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"sualeh","custom":"https://www.paypal.me/sualeh"}},"created_at":"2014-04-29T03:32:49.000Z","updated_at":"2025-03-09T17:34:31.000Z","dependencies_parsed_at":"2023-02-17T10:31:01.937Z","dependency_job_id":"3f3aef51-b13c-4d85-a117-93268623cb96","html_url":"https://github.com/sualeh/magnetictrackparser","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sualeh%2Fmagnetictrackparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sualeh%2Fmagnetictrackparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sualeh%2Fmagnetictrackparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sualeh%2Fmagnetictrackparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sualeh","download_url":"https://codeload.github.com/sualeh/magnetictrackparser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","credit-card","java-library","payment-processing","payments"],"created_at":"2024-11-08T22:12:10.091Z","updated_at":"2025-04-05T11:07:54.149Z","avatar_url":"https://github.com/sualeh.png","language":"Java","readme":"\u003c!-- markdownlint-disable MD041 --\u003e\n[![Quick Build](https://github.com/sualeh/magnetictrackparser/actions/workflows/quick_build.yml/badge.svg)](https://github.com/sualeh/magnetictrackparser/actions/workflows/quick_build.yml)\n[![Code Climate](https://codeclimate.com/github/sualeh/magnetictrackparser.png)](https://codeclimate.com/github/sualeh/magnetictrackparser)\n[![Code Coverage](https://img.shields.io/codeclimate/coverage/sualeh/magnetictrackparser)](https://codeclimate.com/github/sualeh/magnetictrackparser)\n[![The Central Repository](https://img.shields.io/maven-central/v/us.fatehi/magnetictrackparser.svg)](https://search.maven.org/search?q=g:us.fatehi%20magnetictrackparser*)\n\n\u003e **:star: Star it :arrow_heading_up: if you love it!**\n\n# Magnetic Track Parser\n\n*Magnetic Track Parser* is a Java library that can parse magnetic track data from a \nbank issued credit card, such as might be returned from a USB magnetic card stripe \nreader. \n\nMagnetic Track Parser depends on the [Credit Card Number](https://github.com/sualeh/creditcardnumber) library.\n\n\u003e **The goal of this project is to use publicly and freely available documentation \nto create a reliable Java library to provide information about credit cards.**\n\n\n## Resources\n\nSome resources consulted are:\n* [Magnetic stripe card](http://en.wikipedia.org/wiki/Magnetic_stripe_card) on Wikipedia for information about the format of track data.\n\n\n## Design Principles\n\n- All classes are immutable and thread-safe\n- Secure data follows standards in the \n[Java Cryptography Architecture (JCA) Reference Guide](https://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#PBEEx)\n- The standard `toString()` function formats data in a readable form\n- Internationalization of card numbers is supported\n- Validity is enforced by JUnit 5 tests\n- Java 8 or newer is required\n- Android friendly\n\n\n## Download and Use in Projects\n\nYou can [download the jar on the Maven Central Repository](https://search.maven.org/artifact/us.fatehi/magnetictrackparser). \nThe [download page](https://search.maven.org/artifact/us.fatehi/magnetictrackparser) \nhas instructions on how to use the library in your Maven or Gradle build.\n\n\n## Examples\n\n### How to Parse Magnetic Track Data\n\nTo parse a magnetic track, use code like:\n```java\nBankCardMagneticTrack track = \n  BankCardMagneticTrack.from(\"%B5350290149345177^FATEHI/SUALEH^16042010000000000000000000000000000567001000?;5350290149345177=16042010000056700100?\");\nSystem.out.println(track);\n```\nand you will get this output:\n```\nTRACK 1: %B5350290149345177^FATEHI/SUALEH^16042010000000000000000000000000000567001000?\n  Primary Account Number: 5350290149345177\n  Name: Sualeh Fatehi\n  Expiration Date: 2016-04\n  Service Code: 201\n  Discretionary Data: 0000000000000000000000000000567001000\nTRACK 2: ;5350290149345177=16042010000056700100?\n  Primary Account Number: 5350290149345177\n  Expiration Date: 2016-04\n  Service Code: 201\n  Discretionary Data: 0000056700100\nTRACK 3:  Not Available.\n\nBank Card Information: \n  Raw Account Number: 5350290149345177\n  Primary Account Number: 5350290149345177\n    Major Industry Identifier: 5 - Banking and financial\n    Issuer Identification Number: 53502901\n    Card Brand: MasterCard\n    Last Four Digits: 5177\n    Passes Luhn Check? Yes\n    Is Primary Account Number Valid? Yes\n  Name: Sualeh Fatehi\n  Expiration Date: 2016-04\n    Is Expired? Yes\n  Service Code: \n    2 - Interchange: International interchange. Technology: Integrated circuit card.\n    0 - Authorization Processing: Normal.\n    1 - Allowed Services: No restrictions. PIN Requirements: None.\n```\n\n## Who Uses\n\n- Dmitry Holodov's excellent Android app, [SwipeYours](https://github.com/dimalinux/SwipeYours) uses   _magnetictrackparser_. See details in [SetCardActivity.java](\nhttps://github.com/dimalinux/SwipeYours/blob/master/src/main/java/to/noc/android/swipeyours/SetCardActivity.java#L34-L37). This Android app helps developers understand the new Android Host Card Emulation feature for payments, and is written with open source, in the same spirit as _magnetictrackparser_.\n","funding_links":["https://github.com/sponsors/sualeh","https://www.paypal.me/sualeh"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsualeh%2Fmagnetictrackparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsualeh%2Fmagnetictrackparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsualeh%2Fmagnetictrackparser/lists"}