{"id":28409245,"url":"https://github.com/paymentwall/paymentwall-dotnet","last_synced_at":"2025-06-25T00:31:26.524Z","repository":{"id":24814578,"uuid":"28228889","full_name":"paymentwall/paymentwall-dotnet","owner":"paymentwall","description":"Paymentwall .NET Library","archived":false,"fork":false,"pushed_at":"2021-05-17T14:40:12.000Z","size":32,"stargazers_count":7,"open_issues_count":3,"forks_count":9,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-06-02T15:16:20.654Z","etag":null,"topics":[],"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/paymentwall.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":"2014-12-19T12:39:07.000Z","updated_at":"2024-10-04T00:06:27.000Z","dependencies_parsed_at":"2022-08-23T06:50:59.272Z","dependency_job_id":null,"html_url":"https://github.com/paymentwall/paymentwall-dotnet","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/paymentwall/paymentwall-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paymentwall","download_url":"https://codeload.github.com/paymentwall/paymentwall-dotnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-dotnet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261782257,"owners_count":23208901,"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":[],"created_at":"2025-06-02T06:17:54.270Z","updated_at":"2025-06-25T00:31:26.516Z","avatar_url":"https://github.com/paymentwall.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About Paymentwall\n[Paymentwall](https://www.paymentwall.com/?source=gh) is the leading global payments platform.\n\nMerchants can plugin Paymentwall's API to accept payments from over 150 different methods including credit cards, debit cards, bank transfers, SMS/Mobile payments, prepaid cards, eWallets, landline payments and others. \n\nTo sign up for a Paymentwall Merchant Account, [click here](https://www.paymentwall.com/signup/merchant?source=gh).\n\n# Paymentwall C# Library\nThis library allows developers to use [Paymentwall APIs](https://docs.paymentwall.com/?source=gh) (Digital Goods API, Cart API, Brick API, Virtual Currency API).\n\nTo use Paymentwall, all you need to do is to sign up for a Paymentwall Merchant Account so you can setup a project designed for your site.\nTo open your merchant account and set up an project, you can [sign up here](https://www.paymentwall.com/signup/merchant?source=gh).\n\n# Installation\nWe recommend to use NuGet for installing Paymentwall library. To install Paymentwall, please run the following command in the Package Manager Console\n```\nPM\u003e Install-Package Paymentwall\n```\n\n# Code Samples\n\n## Digital Goods API\n\n#### Initializing Paymentwall\n```\nusing Paymentwall;\n\nPaymentwall_Base.setApiType(Paymentwall_Base.API_GOODS);\nPaymentwall_Base.setAppKey(\"YOUR_PROJECT_KEY\"); // available in your Paymentwall merchant area\nPaymentwall_Base.setSecretKey(\"YOUR_SECRET_KEY\"); // available in your Paymentwall merchant area\n```\n\n#### Widget Call\n[Checkout API details](https://docs.paymentwall.com/integration/checkout-home)\n\nThe widget is a payment page hosted by Paymentwall that embeds the entire payment flow: selecting the payment method, completing the billing details, and providing customer support via the Help section. You can redirect the users to this page or embed it via iframe. Below is an example that renders an iframe with Paymentwall Widget.\n```\nList\u003cPaymentwall_Product\u003e productList = new List\u003cPaymentwall_Product\u003e();\nPaymentwall_Product product = new Paymentwall_Product(\n\t\t\t\t\t\t\t\t\"product301\", // id of the product in your system\n\t\t\t\t\t\t\t\t9.99f, // price\n\t\t\t\t\t\t\t\t\"USD\", // currency code\n\t\t\t\t\t\t\t\t\"Gold Membership\", // product name\n\t\t\t\t\t\t\t\tPaymentwall_Product.TYPE_SUBSCRIPTION, // this is a time-based product; for one-time products, use Paymentwall_Product.TYPE_FIXED and omit the following 3 parameters\n\t\t\t\t\t\t\t\t1, // time duration\n\t\t\t\t\t\t\t\tPaymentwall_Product.PERIOD_TYPE_YEAR, // year\n\t\t\t\t\t\t\t\ttrue // recurring\n\t\t\t\t\t\t\t);\nproductList.Add(product);\nPaymentwall_Widget widget = new Paymentwall_Widget(\n\t\"user40012\", // id of the end-user who's making the payment\n\t\"pw\", // widget code, e.g. pw; can be picked inside of your merchant account\n\tproductList,\n\tnew Dictionary\u003cstring, string\u003e() {{\"email\", \"user@hostname.com\"}} // additional parameters\n);\nResponse.Write(widget.getHtmlCode());\n```\n\n#### Pingback Processing\n\nThe Pingback is a webhook notifying about a payment being made. Pingbacks are sent via HTTP/HTTPS to your servers. To process pingbacks use the following code:\n```\nNameValueCollection parameters = Request.QueryString;\nPaymentwall_Pingback pingback = new Paymentwall_Pingback(parameters, HttpContext.Current.Request.ServerVariables[\"REMOTE_ADDR\"]);\nif (pingback.validate())\n{\n\tstring productId = pingback.getProduct().getId();\n\tif (pingback.isDeliverable())\n\t{\n\t\t//deliver the product\n\t}\n\telse if (pingback.isCancelable())\n\t{\n\t\t//withdraw the product\n\t}\n\tResponse.Write(\"OK\"); // Paymentwall expects response to be OK, otherwise the pingback will be resent\n}\nelse {                \n\tResponse.Write(pingback.getErrorSummary());\n}\n```\n\n## Virtual Currency API\n\n#### Initializing Paymentwall\n```\nusing Paymentwall;\n\nPaymentwall_Base.setApiType(Paymentwall_Base.API_VC);\nPaymentwall_Base.setAppKey(\"YOUR_PROJECT_KEY\"); // available in your Paymentwall merchant area\nPaymentwall_Base.setSecretKey(\"YOUR_SECRET_KEY\"); // available in your Paymentwall merchant area\n```\n\n#### Widget Call\n```\nPaymentwall_Widget widget = new Paymentwall_Widget(\n\t\"user40012\", // id of the end-user who's making the payment\n\t\"p1_1\", // widget code, e.g. p1; can be picked inside of your merchant account\n\tnew Dictionary\u003cstring, string\u003e() {{\"email\", \"user@hostname.com\"}} // additional parameters\n);\nResponse.Write(widget.getHtmlCode());\n```\n\n#### Pingback Processing\n\n```\nNameValueCollection parameters = Request.QueryString;\nPaymentwall_Pingback pingback = new Paymentwall_Pingback(parameters, HttpContext.Current.Request.ServerVariables[\"REMOTE_ADDR\"]);\nif (pingback.validate())\n{\n\tfloat virtualCurrency = float.Parse(pingback.getVirtualCurrencyAmount());\n\tif (pingback.isDeliverable())\n\t{\n\t\t// deliver the virtual currency\n\t} else \n\t{\n\t\t// withdraw the virtual currency\n\t}\n\tResponse.Write(\"OK\"); // Paymentwall expects response to be OK, otherwise the pingback will be resent\n}\nelse {\n\tResponse.Write(pingback.getErrorSummary());\n}\n```\n\n## Cart API\n\n#### Initializing Paymentwall\n```\nusing Paymentwall;\n\nPaymentwall_Base.setApiType(Paymentwall_Base.API_CART);\nPaymentwall_Base.setAppKey(\"YOUR_PROJECT_KEY\"); // available in your Paymentwall merchant area\nPaymentwall_Base.setSecretKey(\"YOUR_SECRET_KEY\"); // available in your Paymentwall merchant area\n```\n\n#### Widget Call\n```\nList\u003cPaymentwall_Product\u003e productList = new List\u003cPaymentwall_Product\u003e();\nproductList.AddRange(\n\tnew List\u003cPaymentwall_Product\u003e() {\n\t\tnew Paymentwall_Product(\"product301\", 3.33f, \"EUR\", \"Product name 1\"), //first product on cart\n\t\tnew Paymentwall_Product(\"product607\", 7.77f, \"EUR\", \"Product name 2\") //second product on cart\n\t}\n);\nPaymentwall_Widget widget = new Paymentwall_Widget(\n\t\"user40012\", // id of the end-user who's making the payment\n\t\"p1_1\", // widget code, e.g. p1; can be picked inside of your merchant account\n\tproductList,\n\tnew Dictionary\u003cstring, string\u003e() {{\"email\", \"user@hostname.com\"}} // additional parameters\n);\nResponse.Write(widget.getHtmlCode());\n```\n\n#### Pingback Processing\n\n```\nNameValueCollection parameters = Request.QueryString;\nPaymentwall_Pingback pingback = new Paymentwall_Pingback(parameters, HttpContext.Current.Request.ServerVariables[\"REMOTE_ADDR\"]);\nif (pingback.validate())\n{\n\tList\u003cPaymentwall_Product\u003e products = pingback.getProducts();\n\tif (pingback.isDeliverable())\n\t{\n\t\t// deliver products from the cart\n\t} else \n\t{\n\t\t// withdraw products from the cart\n\t}\n\tResponse.Write(\"OK\"); // Paymentwall expects response to be OK, otherwise the pingback will be resent\n}\nelse \n{\n\tResponse.Write(pingback.getErrorSummary());\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaymentwall%2Fpaymentwall-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaymentwall%2Fpaymentwall-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaymentwall%2Fpaymentwall-dotnet/lists"}