AmazonPayHttpClient 1.0.1

dotnet add package AmazonPayHttpClient --version 1.0.1                
NuGet\Install-Package AmazonPayHttpClient -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AmazonPayHttpClient" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AmazonPayHttpClient --version 1.0.1                
#r "nuget: AmazonPayHttpClient, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AmazonPayHttpClient as a Cake Addin
#addin nuget:?package=AmazonPayHttpClient&version=1.0.1

// Install AmazonPayHttpClient as a Cake Tool
#tool nuget:?package=AmazonPayHttpClient&version=1.0.1                

Intro

AmazonPayLib is a package used for access Amazon Pay Onetime checkout V2 https://developer.amazon.com/docs/amazon-pay/intro.html through HttpClient

No additional dependency

Basic usage

All interfaces typically is generic with two paramameters

IPublicKeyProvider interface retrieve your own public key. You should inherit from it and realize.

IPrivateKeyProvider interface retrieve your own private key. You should inherit from it and realize.

Use with clear HttpClient

Install nuget pacjage AmazonPayHttpClient

Make inheritance from IPrivateKeyProvider IPublicKeyProvider

Use with serviceCollection

Just call AddAmazonPay Extension, and configure your HttpClient by calling ConfigureAmazonPayFor* methods

ConfigureAmazonPayForUnitedStates ConfigureAmazonPayForEurope ConfigureAmazonPayForJapan

Now you can create HttpClient to your code with HttpClientFactory

HttpClient without HttpClientFactory

Just call AmazonHttpClientFactory.CreateForUnitedStates, AmazonHttpClientFactory.CreateForJapan, AmazonHttpClientFactory.CreateForEurope

methods

payload signing

Ones initializing amazon pay on frontend you should send payload and signing to amazon.

Use ISignatureClient interface for it. It added by Add HttpClient to ServiceCollection or you can create it by call SignatureClientFactory.Create

Typing contracts

nuget package AmazonPayHttpClient.Contracts contains classes that marked for use with System.Text.json

Refit интерфейс

nuget package AmazonPayHttpClient.Refit contains interface for Refit.

Call AddAmazonPayRefitClientFor* extension or create it directly

AmazonPayClient.ForEurope, AmazonPayClient.ForJapan, AmazonPayClient.ForUnitedStates

Newtosoft serialzation

nuget package AmazonPayHttpClient.Refit.Newtonsoft contains interface for Refit that use Newtonsoft.Json. nuget package AmazonPayHttpClient.Contracts.Newtonsoft contains class marked for use with Newtosoft.Json

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on AmazonPayHttpClient:

Package Downloads
AmazonPayHttpClient.Refit

Refit interface for AmazonPayHttpClient nuget-package.

AmazonPayHttpClient.Refit.Newtonsoft

Refit interface for AmazonPayHttpClient nuget-package with Newtonsoft Json serializer.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 92 10/30/2024
1.0.0 124 10/29/2024