Vpos 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Vpos --version 1.0.0                
NuGet\Install-Package Vpos -Version 1.0.0                
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="Vpos" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Vpos --version 1.0.0                
#r "nuget: Vpos, 1.0.0"                
#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 Vpos as a Cake Addin
#addin nuget:?package=Vpos&version=1.0.0

// Install Vpos as a Cake Tool
#tool nuget:?package=Vpos&version=1.0.0                

vpos-csharp

Test alternate text is missing from this package README image

This C# Package helps you easily interact with the vPos API Allowing merchants apps/services to request a payment from a client through his/her mobile phone number.

The service currently works for solutions listed below:

EMIS (Multicaixa Express)

Want to know more about how we are empowering merchants in Angola? See our website

Features

  • Simple interface
  • Uniform plain old objects are returned by all official libraries, so you don't have to serialize/deserialize the JSON returned by our API.

Documentation

Does interacting directly with our API service sound better to you? See our documentation on developer.vpos.ao

Configuration

This C# library requires you set up the following environment variables on your machine before interacting with the API using this library:

Variable Description Required
GPO_POS_ID The Point of Sale ID provided by EMIS true
GPO_SUPERVISOR_CARD The Supervisor card ID provided by EMIS true
MERCHANT_VPOS_TOKEN The API token provided by vPOS true
PAYMENT_CALLBACK_URL The URL that will handle payment notifications false
REFUND_CALLBACK_URL The URL that will handle refund notifications false
VPOS_ENVIRONMENT The vPOS environment, leave empty for sandbox mode and use "PRD" for production. false

Don't have this information? Talk to us

Create an instance of Vpos (make sure to define the environment variables above to) to interact with our API. The constructor will be responsible for acquiring the tokens defined above to interact with the API.

Use

Create an instance

Create an instance of Vpos (make sure to define the environment variables above to) to interact with our API. The constructor will be responsible for acquiring the tokens defined above to interact with the API.

Vpos merchant = new Vpos();

Get all Transactions

This endpoint retrieves all transactions.

TransactionsResponse transactionsResponse = merchant.GetTransactions();

Get a specific Transaction

Retrieves a transaction given a valid transaction ID.

TransactionResponse transactionResponse = merchant.GetTransaction("1jHXEbRTIbbwaoJ6w86");
Argument Description Type
id An existing Transaction ID string

New Payment Transaction

Creates a new payment transaction given a valid mobile number associated with a MULTICAIXA account and a valid amount.

LocationResponse locationResponse = merchant.NewPayment("900111222", "123.45");
Argument Description Type
mobile The mobile number of the client who will pay string
amount The amount the client should pay, eg. "259.99", "259000.00" string

Request Refund

Given an existing parentTransactionId, request a refund.

LocationResponse locationResponse = merchant.NewRefund("1jHXEbRTIbbwaoJ6w86");
Argument Description Type
parentTransactionId The ID of transaction you wish to refund string

Poll Transaction Status

Poll the status of a transaction given a valid requestId.

Note: The requestId in this context is essentially the transactionId of an existing request.

BaseResponse response = merchant.GetRequest("1jHXEbRTIbbwaoJ6w86");
if (response.status == 200)
{
    RequestResponse requestResponse = (RequestResponse)response;
}
else if(response.status == 303)
{
    LocationResponse locationresponse = (LocationResponse)response;
}
Argument Description Type
requestId The ID of transaction you wish to poll string

Have any doubts?

In case of any doubts, bugs, or the like, please leave an issue. We would love to help.

License

The library is available as open source under the terms of the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 389 9/22/2021
1.0.1 343 1/30/2021
1.0.0 359 1/20/2021