{"id":1775,"url":"https://github.com/suraphanL/SwiftInAppPurchase","last_synced_at":"2025-08-02T04:32:33.034Z","repository":{"id":62456552,"uuid":"47923390","full_name":"suraphanL/SwiftInAppPurchase","owner":"suraphanL","description":null,"archived":false,"fork":false,"pushed_at":"2016-05-29T14:55:14.000Z","size":41,"stargazers_count":21,"open_issues_count":3,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-25T03:49:28.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/suraphanL.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":"2015-12-13T14:53:08.000Z","updated_at":"2020-05-09T21:16:55.000Z","dependencies_parsed_at":"2022-11-02T00:15:19.577Z","dependency_job_id":null,"html_url":"https://github.com/suraphanL/SwiftInAppPurchase","commit_stats":null,"previous_names":["rpzzzzzz/swiftinapppurchase"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/suraphanL/SwiftInAppPurchase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suraphanL%2FSwiftInAppPurchase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suraphanL%2FSwiftInAppPurchase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suraphanL%2FSwiftInAppPurchase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suraphanL%2FSwiftInAppPurchase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suraphanL","download_url":"https://codeload.github.com/suraphanL/SwiftInAppPurchase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suraphanL%2FSwiftInAppPurchase/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.529Z","updated_at":"2025-08-02T04:32:32.762Z","avatar_url":"https://github.com/suraphanL.png","language":"Swift","readme":"# SwiftInAppPurchase\nSimply code In App Purchases with this Swift Framework\n\n[![CI Status](http://img.shields.io/travis/Rawd/SwiftInAppPurchase.svg?style=flat)](https://travis-ci.org/Rawd/SwiftInAppPurchase)\n[![Version](https://img.shields.io/cocoapods/v/SwiftInAppPurchase.svg?style=flat)](http://cocoapods.org/pods/SwiftInAppPurchase)\n[![License](https://img.shields.io/cocoapods/l/SwiftInAppPurchase.svg?style=flat)](http://cocoapods.org/pods/SwiftInAppPurchase)\n[![Platform](https://img.shields.io/cocoapods/p/SwiftInAppPurchase.svg?style=flat)](http://cocoapods.org/pods/SwiftInAppPurchase)\n\n## Usage\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\n## Installation\n\nSwiftInAppPurchase is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"SwiftInAppPurchase\"\n```\n\n## Author\n\nRawd, suraphan.d@gmail.com\n\n## License\n\nSwiftInAppPurchase is available under the Apache 2.0 license. See the LICENSE file for more info.\n\n##Production Mode\n    SwiftInAppPurchase.sharedInstance.setProductionMode(false)\n\n##Request Products\n    var productIden = Set\u003cString\u003e()\n    productIden.insert(\"com.irawd.test.30d\")\n\n    let iap = SwiftInAppPurchase.sharedInstance\n\n    iap.requestProducts(productIden) { (products, invalidIdentifiers, error) -\u003e () in\n    \n    }\n\n##Purchase\n    let iap = SwiftInAppPurchase.sharedInstance\n    iap.addPayment(\"com.irawd.test.30d\", userIdentifier: nil) { (result) -\u003e () in\n\n        switch result{\n        case .Purchased(let productId,let transaction,let paymentQueue):\n\n            paymentQueue.finishTransaction(transaction)\n        case .Failed(let error):\n            print(error)\n        default:\n            break\n        }            \n    }\n\n##RefreshReceipt\n    let iap = SwiftInAppPurchase.sharedInstance\n    iap.refreshReceipt { (error) -\u003e () in\n        print(error)\n    }\n##VerifyReceipt\n    let iap = SwiftInAppPurchase.sharedInstance\n    iap.verifyReceipt(nil) { (receipt, error) -\u003e () in\n        print(receipt)\n        print(error)\n    }\n##Restore\n    let iap = SwiftInAppPurchase.sharedInstance\n    iap.restoreTransaction(nil) { (result) -\u003e () in\n        switch result{\n        case .Restored(let productId,let transaction,let paymentQueue) :\n            \n            paymentQueue.finishTransaction(transaction)\n        case .Failed(let error):\n            print(error)\n\n        default:\n        break\n        }\n    }       \n##CheckIncompleteTransaction\n    let iap = SwiftInAppPurchase.sharedInstance\n    iap.checkIncompleteTransaction { (result) -\u003e () in\n        switch result{\n        case .Purchased(let productId,let transaction,let paymentQueue):\n            paymentQueue.finishTransaction(transaction)\n        case .Restored(let productId,let transaction,let paymentQueue) :\n\n            paymentQueue.finishTransaction(transaction)\n        default:\n            break\n        }\n    }\n","funding_links":[],"categories":["Payments"],"sub_categories":["Other Parsing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FsuraphanL%2FSwiftInAppPurchase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FsuraphanL%2FSwiftInAppPurchase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FsuraphanL%2FSwiftInAppPurchase/lists"}