{"id":21940166,"url":"https://github.com/softeq/netkit.inapppurchase","last_synced_at":"2026-05-10T19:37:51.443Z","repository":{"id":96440832,"uuid":"187223200","full_name":"Softeq/NetKit.InAppPurchase","owner":"Softeq","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-27T09:30:33.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-01-27T14:53:44.662Z","etag":null,"topics":["dotnet","inapppurchase","netkit"],"latest_commit_sha":null,"homepage":null,"language":"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/Softeq.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-17T13:41:37.000Z","updated_at":"2021-05-12T18:24:40.000Z","dependencies_parsed_at":"2023-03-13T16:31:27.438Z","dependency_job_id":null,"html_url":"https://github.com/Softeq/NetKit.InAppPurchase","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Softeq%2FNetKit.InAppPurchase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Softeq%2FNetKit.InAppPurchase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Softeq%2FNetKit.InAppPurchase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Softeq%2FNetKit.InAppPurchase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Softeq","download_url":"https://codeload.github.com/Softeq/NetKit.InAppPurchase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244973775,"owners_count":20541025,"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":["dotnet","inapppurchase","netkit"],"created_at":"2024-11-29T02:29:24.251Z","updated_at":"2026-05-10T19:37:46.420Z","avatar_url":"https://github.com/Softeq.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Softeq.NetKit.InAppPurchase\n\nSofteq.NetKit.InAppPurchase component simplifies the process of verifying purchases using App Store (for IOS devices) and Google Play (for Android devices).\nAlso you can see programming guide for:\n1. [IOS](https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW1)\n2. [Android](https://developers.google.com/android-publisher/api-ref/purchases/products/get)\n\n# Getting Started\n\n## Install \n1. Check-out master branch from repository;\n2. Add a reference to Softeq.NetKit.InAppPurchase into target project.\n\n## Obtain the P12 key (for Android)\n\nGrab your the P12 key from the [Google Cloud Console](https://console.developers.google.com/).\n\nOpen the project, go to ```APIs \u0026 auth``` \u003e ```Credentials```\n\nClick on ```Create new Client ID```, and select ```Service account``` and ```P12 key```. Then click on ```Create Client ID``` to download it.\n\nInsert the P12 key into Softeq.NetKit.InAppPurchase.\n\n## Setup configuration\n\nAdd PurchaseValidation settings to your ```appsettings.json``` file:\n```json\n    \"PurchaseValidation\": {\n        \"Ios\": {\n          \"Host\":\"HOST_URL\"\n        },\n        \"Android\": {\n          \"IsPlayStoreSupported\": \"TRUE_OR_FALSE\",\n          \"GooglePlayConsoleAccountEmail\":\"YOUR_EMAIL\",\n          \"GooglePlayConsoleAccountPassword\":\"YOUR_PASSWORD\",\n          \"CertificateFileName\":\"CERTIFICATE_FILE_NAME\",\n          \"GoogleApiAuthUrl\":\"https://www.googleapis.com/auth/androidpublisher\"\n        }\n    },\n```\n\nIn the test environment, use ```https://sandbox.itunes.apple.com/verifyReceipt``` as HOST_URL. \nIn production, use ```https://buy.itunes.apple.com/verifyReceipt``` as HOST_URL.\n\n## Configure DI Container\n\nSofteq.NetKit.InAppPurchase comes with Autofac Module to register its dependencies. \nIf different IoC container is used or manual registration is required, the following registrations need to be performed:\n1. Set up and register ```IosPurchaseValidator``` in your DI container\n```csharp\n    builder.Register(x =\u003e\n            {\n                var configuration = context.Resolve\u003cIConfiguration\u003e();\n                var iosPurchaseValidator = new IosPurchaseValidator(configuration[\"PurchaseValidation:Ios:Host\"]);\n                return iosPurchaseValidator;\n            })\n            .As\u003cIIosPurchaseValidator\u003e();\n```\n\n2. Register ```IAndroidPurchaseValidator``` implementation\n```csharp\n    builder.Register(x =\u003e\n            {\n                var configuration = context.Resolve\u003cIConfiguration\u003e();\n\n                var androidPurchaseValidator = new AndroidPurchaseValidator(\n                    configuration[\"PurchaseValidation:Android:IsPlayStoreSupported\"],\n                    configuration[\"PurchaseValidation:Android:GooglePlayConsoleAccountEmail\"],\n                    configuration[\"PurchaseValidation:Android:GooglePlayConsoleAccountPassword\"],\n                    configuration[\"PurchaseValidation:Android:GoogleApiAuthUrl\"],\n                    configuration[\"PurchaseValidation:Android:CertificateFileName\"]);\n                    return androidPurchaseValidator;\n                })\n                .As\u003cIAndroidPurchaseValidator\u003e();\n```\n\n## Use\n\nInject ```IIosPurchaseValidator``` into your service to validate payments using the following action:\n```csharp\n    Task VerifyPaymentAsync(AndroidPurchaseVerificationRequest request);\n```\nInject ```IAndroidPurchaseValidator``` into your service to validate payments using the following action:\n```csharp\n    Task\u003cIosPurchaseVerificationResponse\u003e VerifyPaymentAsync(IosPurchaseVerificationRequest request);\n```\n\n## About\n\nThis project is maintained by Softeq Development Corp.\n\nWe specialize in .NET core applications.\n\n## Contributing\n\nWe welcome any contributions.\n\n## License\n\nThe NetKit.InAppPurchase project is available for free use, as described by the [LICENSE](/LICENSE) (MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsofteq%2Fnetkit.inapppurchase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsofteq%2Fnetkit.inapppurchase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsofteq%2Fnetkit.inapppurchase/lists"}