Skip to content

kingkej/ReceiptVerifierMiddlewareEndpoint

Repository files navigation

📝 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 to get information from Apple.

Installation

Use the package manager NuGet to install library.

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.

services.AddReceiptVerifierEndpointMiddleware(op =>
{
    op.Path = "/api/Subscriptions/receiptInfo";
});

Then call UseReceiptVerifierEndpointMiddleware.

app.UseReceiptVerifierEndpointMiddleware();

ℹ️ Usage

Execute GET request on path you set in configuration. Body of request must contain valid receipt.

{
    "receipt" : "very long base64encoded string"
}

About

Adds an endpoint to retrieve receipt info via AppleReceiptVerifier.NET

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages