-
Notifications
You must be signed in to change notification settings - Fork 0
/
Payment.cs
34 lines (28 loc) · 1.66 KB
/
Payment.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
using IcepayRestClient.Classes.Payment;
namespace IcepayRestClient
{
public class Payment : ServiceBase
{
public Payment(int merchantID, string merchantSecret) : base(merchantID, merchantSecret) { }
public CheckoutResponse Checkout(CheckoutRequest request)
{
return IcepayRestClient.Classes.RestClient.SendAndReceive<CheckoutRequest, CheckoutResponse>("Payment", "Checkout", request, this.MerchantID, this.MerchantSecret);
}
public VaultCheckoutResponse VaultCheckout(VaultCheckoutRequest request)
{
return IcepayRestClient.Classes.RestClient.SendAndReceive<VaultCheckoutRequest, VaultCheckoutResponse>("Payment", "VaultCheckout", request, this.MerchantID, this.MerchantSecret);
}
public AutomaticCheckoutResponse AutomaticCheckout(AutomaticCheckoutRequest request)
{
return IcepayRestClient.Classes.RestClient.SendAndReceive<AutomaticCheckoutRequest, AutomaticCheckoutResponse>("Payment", "AutomaticCheckout", request, this.MerchantID, this.MerchantSecret);
}
public GetPaymentResponse GetPayment(GetPaymentRequest request)
{
return IcepayRestClient.Classes.RestClient.SendAndReceive<GetPaymentRequest, GetPaymentResponse>("Payment", "GetPayment", request, this.MerchantID, this.MerchantSecret);
}
public GetMyPaymentMethodsResponse GetMyPaymentMethods()
{
return IcepayRestClient.Classes.RestClient.SendAndReceive<GetMyPaymentMethodsRequest, GetMyPaymentMethodsResponse>("Payment", "GetMyPaymentMethods", new GetMyPaymentMethodsRequest(), this.MerchantID, this.MerchantSecret);
}
}
}