{"id":50324583,"url":"https://github.com/kuwaitdevs/knet-dotnet-core-integration","last_synced_at":"2026-05-29T05:03:24.077Z","repository":{"id":98168331,"uuid":"365256992","full_name":"kuwaitdevs/knet-dotnet-core-integration","owner":"kuwaitdevs","description":"RAW Integration of Knet payment gateway in .NET core","archived":false,"fork":false,"pushed_at":"2021-05-08T07:04:32.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T07:55:30.607Z","etag":null,"topics":["asp-net-core","csharp","dotnet-core","fss-ipay","knet","kuwait","php"],"latest_commit_sha":null,"homepage":"","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/kuwaitdevs.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":"2021-05-07T14:18:20.000Z","updated_at":"2024-12-30T12:28:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6522fa9-38c3-4160-9c7c-dcd9f7b6bf1e","html_url":"https://github.com/kuwaitdevs/knet-dotnet-core-integration","commit_stats":null,"previous_names":["kuwaitdevs/knet-dotnet-core-integration","anasnajaa/knet-dotnet-core-integration"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kuwaitdevs/knet-dotnet-core-integration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuwaitdevs%2Fknet-dotnet-core-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuwaitdevs%2Fknet-dotnet-core-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuwaitdevs%2Fknet-dotnet-core-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuwaitdevs%2Fknet-dotnet-core-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kuwaitdevs","download_url":"https://codeload.github.com/kuwaitdevs/knet-dotnet-core-integration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuwaitdevs%2Fknet-dotnet-core-integration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33637485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":["asp-net-core","csharp","dotnet-core","fss-ipay","knet","kuwait","php"],"created_at":"2026-05-29T05:03:21.293Z","updated_at":"2026-05-29T05:03:24.057Z","avatar_url":"https://github.com/kuwaitdevs.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Knet Dotnet Core Integration\n\n.NET Core RAW API Integration of Knet payment gateway.  \nThis is an unofficial port of the official PHP example provided by Knet.\n\n## Why use RAW integration instead of iPayPipe (DLL)?\n\n- iPayPipe requires [IKVM](https://www.ikvm.net/#Introduction) to work in C# based code which is not ideal, especially that the IKVM project is not in active development.\n- The IKVM version provided by Knet is not compatible with .NET Core.\n- This approach reduces dependencies and produces a lighter application footprint.\n- The published app is compatible with all platforms.\n\n## Disclaimer\n\n- This is NOT an official port, use it at your own risk. No warranty is provided.\n- This is a proof of concept and should not be used in a production environment.\n- Please review Knet official documentation first before implementing.\n\n## Development Requirements\n\n- OS: Mac, Windows or Linux\n- Visual Studio Code / Visual Studio (for debugging)\n- .NET Core 5 SDK (for development) and .NET Core Hosting bundle (for publishing) https://dotnet.microsoft.com/download/dotnet/5.0\n\n## Building and Publishing\n\n- Run `dotnet restore`\n- Build with `dotnet build`\n- Run locally with `dotnet run`\n- Publish with `dotnet publish`\n\n## Before You Start\n\nTo test properly, please follow these steps:\n\n- Contact Knet to provide you with Sandbox API details.\n- Plug in your KNET details inside the appsettings.json, you will need:\n  - Knet Sandbox Tranportal Id\n  - Knet Sandbox Tranportal Password\n  - Knet Sandbox Payment Api Url (kpaytest)\n  - Knet Sandbox Terminal Resource Key\n- Test using the checkout form.\n- Once everything is OK, contact Knet to provide you with the production API details. (payment flow verification might be required)\n- Implement the payment flow in your real project with the necessary adjustments such as:\n  - Knet production API endpoint (kpay instead of kpaytest)\n  - Proper Response and Error webhooks\n  - Production Tranportal details\n  - Proper Track ID generation\n  - Database Integration\n  - Logging\n  - Additional Security\n\n## Pages of Interest\n\n- Index.cshtml: Landing page\n- init-payment.cshtml and init-payment.cshtml.cs: Checkout page that kicks off the payment process\n- payment-response.cshtml and payment-response.cshtml.cs: The response page/webhook that is used by Knet. Knet performs a POST request against this page once the process is finished from their side. The result can be successful (CAPTURED) or failed (anything else).\n- payment-error.cshtml: The error page that is used by Knet. Knet performs a GET request against this page if there are any errors related to the payment gateway or the payment process.\n- knetUtil.cs: Utility Knet class that contains the bulk of the encryption/decryption logic.\n- phpExample.php: A summary of the official Knet PHP example. Use this file to compare .NET Core outputs with PHP outputs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuwaitdevs%2Fknet-dotnet-core-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuwaitdevs%2Fknet-dotnet-core-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuwaitdevs%2Fknet-dotnet-core-integration/lists"}