forked from Adyen/adyen-dotnet-api-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPosPaymentLocalApi.cs
71 lines (65 loc) · 3.46 KB
/
PosPaymentLocalApi.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Net.Security;
using System.Threading;
using System.Threading.Tasks;
using Adyen.Model.Nexo;
using Adyen.Security;
namespace Adyen.Service
{
public class PosPaymentLocalApi: AbstractService, IPosPaymentLocalApi
{
private readonly TerminalLocalApi _terminalLocalApi;
[Obsolete("This in person payment class is deprecated and will be removed in the next major, please refer to TerminalLocalApi.cs")]
public PosPaymentLocalApi(Client client)
: base(client)
{
_terminalLocalApi = new TerminalLocalApi(client);
}
/// <summary>
/// Terminal Api https call
/// </summary>
/// <param name="saleToPoiRequest"></param>
/// <param name="encryptionCredentialDetails"></param>
/// <returns></returns>
[Obsolete("This in person payment class is deprecated and will be removed in the next major, please refer to TerminalLocalApi.cs")]
public SaleToPOIResponse TerminalApiLocal(SaleToPOIMessage saleToPoiRequest, EncryptionCredentialDetails encryptionCredentialDetails)
{
return _terminalLocalApi.TerminalRequest(saleToPoiRequest, encryptionCredentialDetails);
}
/// <summary>
/// Terminal Api https call asynchronous
/// </summary>
/// <param name="saleToPoiRequest"></param>
/// <param name="encryptionCredentialDetails"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
[Obsolete("This in person payment class is deprecated and will be removed in the next major, please refer to TerminalLocalApi.cs")]
public async Task<SaleToPOIResponse> TerminalApiLocalAsync(SaleToPOIMessage saleToPoiRequest, EncryptionCredentialDetails encryptionCredentialDetails, CancellationToken cancellationToken = default)
{
return await _terminalLocalApi.TerminalRequestAsync(saleToPoiRequest, encryptionCredentialDetails, cancellationToken);
}
/// <summary>
/// Terminal Api https call
/// </summary>
/// <param name="saleToPoiRequest"></param>
/// <param name="encryptionCredentialDetails"></param>
/// <param name="remoteCertificateValidationCallback"></param>
/// <returns></returns>
[Obsolete("Use the overload of the method without passing RemoteCertificateValidationCallback. The terminal certificate validation is handled at the http request the adyen library")]
public SaleToPOIResponse TerminalApiLocal(SaleToPOIMessage saleToPoiRequest, EncryptionCredentialDetails encryptionCredentialDetails, RemoteCertificateValidationCallback remoteCertificateValidationCallback)
{
return TerminalApiLocal(saleToPoiRequest: saleToPoiRequest, encryptionCredentialDetails: encryptionCredentialDetails);
}
/// <summary>
/// Used to decrypt the notification received
/// </summary>
/// <param name="notification"></param>
/// <param name="encryptionCredentialDetails"></param>
/// <returns></returns>
[Obsolete("This in person payment class is deprecated and will be removed in the next major, please refer to TerminalLocalApi.cs")]
public string DecryptNotification(string notification, EncryptionCredentialDetails encryptionCredentialDetails)
{
return _terminalLocalApi.DecryptNotification(notification, encryptionCredentialDetails);
}
}
}