CP.VPOS 1.8.3

dotnet add package CP.VPOS --version 1.8.3
NuGet\Install-Package CP.VPOS -Version 1.8.3
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="CP.VPOS" Version="1.8.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CP.VPOS --version 1.8.3
#r "nuget: CP.VPOS, 1.8.3"
#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 CP.VPOS as a Cake Addin
#addin nuget:?package=CP.VPOS&version=1.8.3

// Install CP.VPOS as a Cake Tool
#tool nuget:?package=CP.VPOS&version=1.8.3

CP.VPOS

Nuget download Nuget v2 build GitHub license

.net version .net version .net version .net version .net version .net version .net maui

Bu projenin amacı, tüm sanal posları tek bir codebase ile kullanmak.

Kullanılabilir Sanal POS'lar

Sanal POS Satış Satış 3D İptal İade
Akbank ✔️ ✔️ ✔️ ✔️
Alternatif Bank ✔️ ✔️ ✔️ ✔️
Anadolubank ✔️ ✔️ ✔️ ✔️
Denizbank ✔️ ✔️ ✔️ ✔️
QNB Finansbank ✔️ ✔️ ✔️ ✔️
Finansbank Nestpay ✔️ ✔️ ✔️ ✔️
Garanti BBVA ✔️ ✔️
Halkbank ✔️ ✔️ ✔️ ✔️
ING Bank ✔️ ✔️ ✔️ ✔️
İş Bankası ✔️ ✔️ ✔️ ✔️
Şekerbank ✔️ ✔️ ✔️ ✔️
Türk Ekonomi Bankası ✔️ ✔️ ✔️ ✔️
Türkiye Finans ✔️ ✔️ ✔️ ✔️
Vakıfbank ✔️ ✔️
Yapı Kredı Bankası ✔️ ✔️
Ziraat Bankası ✔️ ✔️ ✔️ ✔️
Cardplus ✔️ ✔️ ✔️ ✔️
Paratika ✔️ ✔️ ✔️ ✔️
Payten - MSU ✔️ ✔️ ✔️ ✔️
Iyzico ✔️ ✔️ ✔️ ✔️
Sipay ✔️ ✔️ ✔️ ✔️
QNBpay ✔️ ✔️ ✔️ ✔️
ParamPos ✔️ ✔️ ✔️ ✔️
PayBull ✔️ ✔️ ✔️ ✔️
Parolapara ✔️ ✔️ ✔️ ✔️
IQmoney ✔️ ✔️ ✔️ ✔️

NuGet

https://www.nuget.org/packages/CP.VPOS

Package Manager:

Install-Package CP.VPOS

Dotnet CLI

dotnet add package CP.VPOS

Dökümanlar

API Bilgilerinin ayarlanması - VirtualPOSAuth Class'ı

Alan açıklamaları:

Alan Tür Açıklama
bankCode string Hangi banka entegrasyonunun kullanılacağının belirlendiği alandır. Banka kodlarının belirlenmesinde, bankaların global EFT kodları kullanılmıştır. 4 haneli olarak girilmelidir. Örneğin; Akbank global EFT kodu 46 dır. Akbank Sanal POS entegrasyonunu kullanmak için 0046 girilmelidir. Veya CP.VPOS.Services.BankService Enum Class'ı kullanılabilir. Örneğin: CP.VPOS.Services.BankService.Akbank
merchantID string Firma kodu
merchantUser string API kullanıcı adı
merchantPassword string API kullanıcı şifre
merchantStorekey string Bazı bankalar için 3D store key
testPlatform boolean Ortam bilgisi. Sanal POS Test ortamı için true gönderilmelidir.

Sanal POS bazlı alan açıklamaları:

Sanal POS bankCode merchantID merchantUser merchantPassword merchantStorekey
Akbank CP.VPOS.Services.BankService.Akbank Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Alternatif Bank CP.VPOS.Services.BankService.AlternatifBank Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Anadolubank CP.VPOS.Services.BankService.Anadolubank Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Denizbank CP.VPOS.Services.BankService.Denizbank Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
QNB Finansbank CP.VPOS.Services.BankService.QNBFinansbank Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Finansbank Nestpay CP.VPOS.Services.BankService.FinansbankNestpay Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Garanti BBVA CP.VPOS.Services.BankService.GarantiBBVA Firma Kodu Terminal No PROVAUT kullanıcısı şifresi 3D secure anahtarı
Halkbank CP.VPOS.Services.BankService.Halkbank Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
ING Bank CP.VPOS.Services.BankService.INGBank Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
İş Bankası CP.VPOS.Services.BankService.IsBankasi Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Şekerbank CP.VPOS.Services.BankService.Sekerbank Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Türk Ekonomi Bankası CP.VPOS.Services.BankService.TurkEkonomiBankasi Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Türkiye Finans CP.VPOS.Services.BankService.TurkiyeFinans Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Vakıfbank CP.VPOS.Services.BankService.Vakifbank Üye İşyeri Numarası POS No Api Şifresi
Yapı Kredı Bankası CP.VPOS.Services.BankService.YapiKrediBankasi Firma Kodu Terminal No Pos Net ID ENCKEY
Ziraat Bankası CP.VPOS.Services.BankService.ZiraatBankasi Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Cardplus CP.VPOS.Services.BankService.Cardplus Mağaza Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre 3D Storekey (Üye İş Yeri Anahtarı)
Paratika CP.VPOS.Services.BankService.Paratika Firma Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre
Payten - MSU CP.VPOS.Services.BankService.Payten Firma Kodu Api Kullanıcısı Adı Api Kullanıcısı Şifre
Iyzico CP.VPOS.Services.BankService.Iyzico Üye İşyeri Numarası API Anahtarı Güvenlik Anahtarı
Sipay CP.VPOS.Services.BankService.Sipay Üye İşyeri ID Uygulama Anahtarı Uygulama Parolası Üye İşyeri Anahtarı
QNBpay CP.VPOS.Services.BankService.QNBpay Üye İşyeri ID Uygulama Anahtarı Uygulama Parolası Üye İşyeri Anahtarı
ParamPos CP.VPOS.Services.BankService.ParamPos Terminal No (Client Code) Kullanıcı Adı Şifre Anahtar (Guid)
PayBull CP.VPOS.Services.BankService.PayBull Üye İşyeri ID Uygulama Anahtarı Uygulama Parolası Üye İşyeri Anahtarı
Parolapara CP.VPOS.Services.BankService.Parolapara Üye İşyeri ID Uygulama Anahtarı Uygulama Parolası Üye İşyeri Anahtarı
IQmoney CP.VPOS.Services.BankService.IQmoney Üye İşyeri ID Uygulama Anahtarı Uygulama Parolası Üye İşyeri Anahtarı

3D'siz Direkt Satış İşlemi

payment3D.confirm = false gönderilmesi halinde 3D'siz çekim işlemi yapılır ve direkt olarak nihai sonucu döner.

VirtualPOSAuth nestpayAkbank = new VirtualPOSAuth
{
	bankCode = CP.VPOS.Services.BankService.Akbank,
	merchantID = "100100000",
	merchantUser = "AKTESTAPI",
	merchantPassword = "AKBANK01",
	merchantStorekey = "123456",
	testPlatform = true
};

CustomerInfo customerInfo = new CustomerInfo
{
	taxNumber = "1111111111",
	emailAddress = "test@test.com",
	name = "cem",
	surname = "pehlivan",
	phoneNumber = "1111111111",
	addressDesc = "adres",
	cityName = "istanbul",
	country = CP.VPOS.Enums.Country.TUR,
	postCode = "34000",
	taxOffice = "maltepe",
	townName = "maltepe"
};

SaleRequest saleRequest = new SaleRequest
{
	invoiceInfo = customerInfo,
	shippingInfo = customerInfo,
	saleInfo = new SaleInfo
	{
		cardNameSurname = "cem test",
		cardNumber = "4355084355084358",
		cardExpiryDateMonth = 12,
		cardExpiryDateYear = 2030,
		amount = (decimal)100.50,
		cardCVV = "000",
		currency = CP.VPOS.Enums.Currency.TRY,
		installment = 1,
	},
	payment3D = new Payment3D
	{
		confirm = false
	},
	customerIPAddress = "1.1.1.1",
	orderNumber = Convert.ToInt32((DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds).ToString("X")
};


var resp = VPOSClient.Sale(saleRequest, nestpayAkbank);

3D Secure Satış İşlemi

payment3D.confirm = true gönderilmesi halinde 3D li satış işlemi başlatılır. 3D li işlemlerde payment3D.returnURL alanına 3D den gelecek olan cevabın iletilmesi istenen URL girilmelidir. Örneğin: https://localhost/Payment/VirtualPOS3DResponse.

VPOSClient.Sale metodundan dönen cevaptaki statu enum alanı RedirectURL veya RedirectHTML döner. statu RedirectURL ise message alanında client'ı yönlendirmeniz gereken url bulunur. statu RedirectHTML ise message alanında client'ın sayfasında çalıştırmanız gereken HTML bulunur.

Bu işlem sonrası client, banka 3D doğrulama sayfasına yönlendirilir. Bu sayfadaki işlem sonucunu banka, payment3D.returnURL alanında belirttiğimiz url e client'ın browserını kullanarak form post yöntemi ile döner.

3D den gelen form request body'sini Dictionary<string, object> e çevirip VPOSClient.Sale3DResponse methoduna gönderilmesi gerekmektedir. Bu işlem sonrası nihai sonuç döner.

VirtualPOSAuth nestpayAkbank = new VirtualPOSAuth
{
	bankCode = CP.VPOS.Services.BankService.Akbank,
	merchantID = "100100000",
	merchantUser = "AKTESTAPI",
	merchantPassword = "AKBANK01",
	merchantStorekey = "123456",
	testPlatform = true
};

CustomerInfo customerInfo = new CustomerInfo
{
	taxNumber = "1111111111",
	emailAddress = "test@test.com",
	name = "cem",
	surname = "pehlivan",
	phoneNumber = "1111111111",
	addressDesc = "adres",
	cityName = "istanbul",
	country = CP.VPOS.Enums.Country.TUR,
	postCode = "34000",
	taxOffice = "maltepe",
	townName = "maltepe"
};

SaleRequest saleRequest = new SaleRequest
{
	invoiceInfo = customerInfo,
	shippingInfo = customerInfo,
	saleInfo = new SaleInfo
	{
		cardNameSurname = "cem test",
		cardNumber = "4355084355084358",
		cardExpiryDateMonth = 12,
		cardExpiryDateYear = 2030,
		amount = (decimal)100.50,
		cardCVV = "000",
		currency = CP.VPOS.Enums.Currency.TRY,
		installment = 1,
	},
	payment3D = new Payment3D
	{
		confirm = true,
		returnURL = "https://localhost/Payment/VirtualPOS3DResponse"
	},
	customerIPAddress = "1.1.1.1",
	orderNumber = Convert.ToInt32((DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds).ToString("X")
};


var resp = VPOSClient.Sale(saleRequest, nestpayAkbank);

3D Secure Satış İşlemi 2. Adım


public class PaymentController
{
    public async Task<IActionResult> VirtualPOS3DResponse()
    {
        Dictionary<string, object> pairs = Request.Form.Keys.ToDictionary(k => k, v => (object)Request.Form[v]);    

        SaleResponse response = VPOSClient.Sale3DResponse(new Sale3DResponseRequest
        {
            responseArray = pairs
        }, nestpayAkbank);
    }
}

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
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.8.3 83 4/16/2024
1.8.2 70 4/16/2024
1.8.1 118 3/27/2024
1.8.0 102 3/7/2024
1.7.2 106 2/14/2024
1.7.1 105 1/31/2024
1.7.0 199 12/18/2023
1.6.3 130 12/1/2023
1.6.2 132 11/14/2023
1.6.1 264 7/27/2023
1.6.0 178 7/4/2023
1.5.4 168 5/25/2023
1.5.3 180 4/19/2023
1.5.2 259 3/1/2023
1.5.1 243 2/15/2023
1.5.0 301 1/19/2023
1.4.0 480 6/2/2022
1.3.2 403 5/30/2022
1.3.1 394 5/27/2022
1.3.0 401 5/20/2022
1.2.1 414 5/16/2022
1.2.0 335 12/8/2021
1.1.0 2,255 11/25/2021
1.0.1 350 11/19/2021
1.0.0 315 11/17/2021

.net core uygulamalarda 3d response array olarak gelmesi bug fix, xml to dictionary .net 4.5 bug fix