This is a module for working with Rustore Api developed on the Microsoft platform.
- C# programming language
- JetBrains Rider 2021.3.4 (IDE)
- Git & Github (Version Control)
- Add a Star 🌟 to this 👆 Repository
Download or Clone the source code from Here or Find the package at nuget.org RustoreApi
- Get PrivateKey according to the instructions in the documentation on the official Rustor website
- Get the CompanyId here
- Initialize the RustoreClient
using RustoreApi;
RustoreClient rustoreClient = new RustoreClient(new RustoreParams
{
CompanyId = <Your company id>,
PrivateKey = <Your private key>,
TimeZone = <Timezone server> //example +03:00
});
...
- Perform one of the methods described below
- Payment receipt method (info here)
...
var data = await rustoreClient.GetPaymentByPaymentId(new PaymentByPaymentIdRequest
{
SubscriptionToken = <Your subscription token>
});
- Method for retrieving subscription data (info here)
var data = await rustoreClient.GetPaymentBySubscriptionId(new PaymentBySubscriptionIdRequest
{
SubscriptionToken = <Your subscription token>
});
- Subscription data retrieval method (V2) (info here)
var receipt = await rustoreClient.GetSubscriptionsByPaymentIdV2(new SubscriptionsV2Request
{
SubscriptionToken = <Your subscription token>,
UserId = <Your user id>,
SubscriptionId = <Your subscription id>, //example test_subscription_1
PackageName = <Your package name> //example com.app
});
- Method for obtaining subscription status (info here)
var data = await rustoreClient.GetStatusSubscription(new StatusSubscriptionRequest
{
SubscriptionToken = <Your subscription token>
});