{"id":1780,"url":"https://github.com/MaxKramer/ObjectiveLuhn","last_synced_at":"2025-08-02T04:32:32.459Z","repository":{"id":6143513,"uuid":"7372361","full_name":"maxkramer/ObjectiveLuhn","owner":"maxkramer","description":"Luhn Credit Card Validation Algorithm","archived":true,"fork":false,"pushed_at":"2016-09-13T11:34:46.000Z","size":204,"stargazers_count":129,"open_issues_count":1,"forks_count":20,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-29T20:03:53.234Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://maxkramer.github.io/ObjectiveLuhn/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxkramer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-30T01:36:30.000Z","updated_at":"2025-05-26T02:40:28.000Z","dependencies_parsed_at":"2022-09-07T15:22:56.368Z","dependency_job_id":null,"html_url":"https://github.com/maxkramer/ObjectiveLuhn","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/maxkramer/ObjectiveLuhn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkramer%2FObjectiveLuhn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkramer%2FObjectiveLuhn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkramer%2FObjectiveLuhn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkramer%2FObjectiveLuhn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxkramer","download_url":"https://codeload.github.com/maxkramer/ObjectiveLuhn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkramer%2FObjectiveLuhn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334618,"owners_count":24233793,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-01-05T20:15:55.639Z","updated_at":"2025-08-02T04:32:32.150Z","avatar_url":"https://github.com/maxkramer.png","language":"Objective-C","funding_links":[],"categories":["Payments"],"sub_categories":["Other Parsing","Other free courses"],"readme":"Luhn Algorithm\n==============\n\n[![Circle CI](https://circleci.com/gh/MaxKramer/ObjectiveLuhn/tree/master.svg?style=shield)](https://circleci.com/gh/MaxKramer/ObjectiveLuhn/tree/master) [![CocoaPods](https://cocoapod-badges.herokuapp.com/v/ObjectiveLuhn/badge.png)](http://cocoapods.org/?q=ObjectiveLuhn)\n\nThis is a port of the Luhn Algorithm, generally used for validating Credit Card details, to Objective-C (iOS).\n\n**Swift** port can be found at [https://github.com/MaxKramer/SwiftLuhn](https://github.com/MaxKramer/SwiftLuhn).\n\nIt's as simple as calling one single method; no special formatting is required.\n\nYou must run `pod install` before opening the Example Project's 'workspace.\n\n## Instructions\n\nImport the header:\n\n```obj-c\n#import \"Luhn.h\"\n```\n    \nCall the class method returning a `BOOL` as to whether the string is valid or not:\n\n```obj-c\nBOOL isValid = [Luhn validateString:@\"some credit card number\"];\n    \nif (isValid) {\n    // process payment   \n}\nelse {\n    // alert user\n}\n```\n\nAlternatively, you can use the NSString category (no additional imports required):\n\n```obj-c\nNSString *ccNumber = @\"378282246310005\";\nBOOL isValid = [ccNumber isValidCreditCardNumber];\n```\n\nYou can also get the type of the credit card i.e. Visa, Diners, Amex, etc:\n\n```obj-c\nOLCreditCardType cardType = [ccNumber creditCardType];\n// or\nOLCreditCardType cardType = [Luhn typeFromString:ccNumber];\n```\n\nIf you come across any issues or have a feature request, please open an issue or find me on:\n\nTwitter: [@maxkramer](http://twitter.com/maxkramer)\n\nWebsite: [http://maxkramer.co](http://maxkramer.co)\n\n## Sources\n\n|Name|Website|Reason|\n|:---|:------|:-----|\n|Paypal|[http://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm](http://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm)|List of valid credit card numbers for the unit tests|\n\n## Thanks\n\nAyaka Nonaka for updating the Cocoapod spec and helping me with other aspects of the project!\n\nTwitter: [@ayanonagon](https://twitter.com/ayanonagon)\n\n## License\n\nThis project is licensed under the [MIT License](https://github.com/MaxKramer/ObjectiveLuhn/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMaxKramer%2FObjectiveLuhn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMaxKramer%2FObjectiveLuhn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMaxKramer%2FObjectiveLuhn/lists"}