-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kej
committed
Nov 7, 2022
1 parent
a39c042
commit 86b8380
Showing
1 changed file
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,34 @@ | ||
Description | ||
# 📝 What is ReceiptVerifierMiddlewareEndpoint? | ||
|
||
ReceiptVerifierMiddlewareEndpoint is a library used to add an endpoint to verify and get information about receipt from Apple. It uses [AppleReceiptVerifier.NET](https://github.com/alexalok/AppleReceiptVerifier.NET) to get information from Apple. | ||
|
||
## Installation | ||
|
||
Use the package manager [NuGet](https://www.nuget.org/packages/ReceiptVerifierMiddlewareEndpoint) to install library. | ||
|
||
```bash | ||
NuGet\Install-Package ReceiptVerifierMiddlewareEndpoint -Version 1.0.1 | ||
``` | ||
|
||
## ⚙️ Configuration | ||
Before beginning please make sure you injected AppleReceiptVerifier.NET to your project. Otherwise you will get an exception. | ||
|
||
Firstly use AddReceiptVerifierEndpointMiddleware method and pass path. You will be able to get receipt info by using that path. | ||
```csharp | ||
services.AddReceiptVerifierEndpointMiddleware(op => | ||
{ | ||
op.Path = "/api/Subscriptions/receiptInfo"; | ||
}); | ||
``` | ||
Then call UseReceiptVerifierEndpointMiddleware. | ||
```csharp | ||
app.UseReceiptVerifierEndpointMiddleware(); | ||
``` | ||
|
||
## ℹ️ Usage | ||
Execute GET request on path you set in configuration. Body of request must contain valid receipt. | ||
```json | ||
{ | ||
"receipt" : "very long base64encoded string" | ||
} | ||
``` |