{"id":1789,"url":"https://github.com/yassram/YRPayment","last_synced_at":"2025-08-02T05:32:58.402Z","repository":{"id":56929705,"uuid":"194070726","full_name":"yassram/YRPayment","owner":"yassram","description":"Better payment user experience library with cool animation in Swift","archived":false,"fork":false,"pushed_at":"2022-07-04T16:26:55.000Z","size":16370,"stargazers_count":183,"open_issues_count":4,"forks_count":17,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-23T19:19:18.947Z","etag":null,"topics":["animation","credit-card","payment","swift","ui"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/yassram.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":"2019-06-27T10:01:00.000Z","updated_at":"2024-04-23T19:19:18.948Z","dependencies_parsed_at":"2022-08-21T00:01:11.068Z","dependency_job_id":null,"html_url":"https://github.com/yassram/YRPayment","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassram%2FYRPayment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassram%2FYRPayment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassram%2FYRPayment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassram%2FYRPayment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yassram","download_url":"https://codeload.github.com/yassram/YRPayment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228443621,"owners_count":17920760,"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":["animation","credit-card","payment","swift","ui"],"created_at":"2024-01-05T20:15:55.847Z","updated_at":"2024-12-06T09:30:26.598Z","avatar_url":"https://github.com/yassram.png","language":"Swift","funding_links":[],"categories":["Payments"],"sub_categories":["Other Parsing"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/ramsserio.svg?style=social\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Swift-4.2-orange.svg\" /\u003e\n  \u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Carthage-compatible-brightgreen.svg\" alt=\"Carthage\" /\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://cocoapods.org/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Cocoapods-compatible-brightgreen.svg\" alt=\"Carthage\" /\u003e\n  \u003c/a\u003e\n  \n  \n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"preview/YRPaymentBanner.png\" width=\"700\"\u003e\n\u003c/p\u003e\n\n## 🎬 Preview\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"preview/preview1.gif\" height=\"700\"\u003e\n\u003c/p\u003e\n\n## 🌟 Features\n- [x] Easily usable\n- [x] Simple Swift syntax\n- [x] Cool flip animation\n- [x] Compatible with `Carthage`\n- [x] Compatible with `CocoaPods`\n- [x] Customizable\n- [x] Universal (iPhone \u0026 iPad)\n- [x] Lightweight readable codebase\n- [x] And More...\n\n## 📲 Installation\n\n#### Using [CocoaPods](https://cocoapods.org)\n\nEdit your `Podfile` and specify the dependency:\n\n```ruby\npod \"YRPayment\"\n```\n\n#### Using [Carthage](https://github.com/carthage)\n\nEdit your `Cartfile` and specify the dependency:\n\n```bash\ngithub \"yassram/YRPayment\"\n```\n\n## 🐒 How to use\n\nIn **4** steps:\n\n**1.** Import YRPayment.\n```swift\nimport YRPayment\n```\n\n**2.** Create a YRPaymentCreditCard instance and link it to a YRPayement instances:\n```swift\nlet card = YRPaymentCreditCard()\nlet payment = YRPayment(creditCard: card)\n```\n\n**3.** Add your card to a view and set its position: \n```swift\nview.addSubview(card)\ncard.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true\ncard.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true\n```\n**4.** link your textFields to the payment object: \n```swift\npayment.numberTextField = NumberTF\npayment.holderNameTextField = NameTF\npayment.validityTextField = ValidityTF\npayment.cryptogramTextField = cryptoTF\n```\n\u003e *(Assuming that NumberTF, NameTF, ValidityTF, cryptoTF are textField alrready created)*\n\n**5.** Enjoooooooy ! \n\u003cp align=\"center\"\u003e\n\u003cimg src=\"preview/previewImg.png\" height=\"400\"\u003e\n\u003c/p\u003e\n\n## 🔍 Extracting data from the credit card\n\nTo extract data from the credit card :\n\n1. Credit card number :\n```swift\npayment.getCardNumber()\n```\n\n2. Credit card holder name :\n```swift\npayment.getCardHolderName()\n```\n\n3. Credit card validity :\n```swift\npayment.getCardValidity()\n```\n\n4. Credit card cryptogram\n```swift\npayment.getCardCryptogram()\n```\n\n## 🎨 Customization : (more features are coming soon)\n\n### 💳 Customizing the credit card type (Symbole):\n\nWhen creating your creditCard instance (as seen before 👆) MasterCard is default:\n```swift\nlet card = YRPaymentCreditCard()\n```\nyou can specify the symbole you want from the available types:\n```swift\nlet card = YRPaymentCreditCard(type: .masterCard)\n```\nor specify a custom one by uploading your own image symbole:\n```swift\nlet image = UIImage(named: \"mySymboleImage\")!\nlet card = YRPaymentCreditCard(type: .custom(image))\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"preview/visa_front.png\" height=\"300\"\u003e\n  \u003cimg src=\"preview/visa_back.png\" height=\"300\"\u003e\n\u003c/p\u003e\n\n\u003e **More types are coming soon**\n### 🕹 Enable/Disable flip on user tap:\n```swift\n// Enable\npayment.flipOnClick = true\n\n// Disable\npayment.flipOnClick = false\n```\n\n## 🙏 Contributing\nThis is an open source project, so feel free to contribute. How?\n- Open an \u003ca href=\"https://github.com/YRPayment/issues/new\"\u003e issue\u003c/a\u003e.\n- Send feedback via \u003ca href=\"mailto:ramsserio@gmail.com\"\u003eemail\u003c/a\u003e.\n- Propose your own fixes, suggestions and open a pull request with the changes.\n\n\n## 📢 Mentions\n- https://www.cocoacontrols.com/controls/better-payment-user-experience-library-with-cool-animation-in-swift\n- https://github.com/vsouza/awesome-ios\n\nDid you mention `YRPayment` in your website, do you use it in your app ? send me a \u003ca href=\"mailto:ramsserio@gmail.com\"\u003emessage\u003c/a\u003e to be added in this section!\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n## 💻 Author\n\n* Yassir Ramdani\n\n\n## 📝 License\n\n```\nMIT License\n\nCopyright (c) 2019 yassir RAMDANI\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyassram%2FYRPayment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyassram%2FYRPayment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyassram%2FYRPayment/lists"}