C# Класс Kurejito.Gateways.SagePay.VspDirect.SagePayPaymentGateway

A payment gateway interface to the SagePay VspDirect payment system.
Наследование: IPurchase
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Accepts ( Currency currency, CardType cardType ) : bool
Purchase ( string merchantReference, Kurejito.Payments.Money amount, PaymentCard card ) : PaymentResponse

Attempts to debit the specified amount from the supplied payment card.

Because the SagePay gateway requires a shopping basket, this overload will create a simple basket containing a single line item whose description is auto-generated from the supplied order details.

SagePayPaymentGateway ( IHttpPostTransport http, string vendorName, decimal vpsProtocol, GatewayMode mode ) : System

Construct a new SagePayPaymentGateway that uses the supplied IHttpPostTransport to communicate with the remote server.

Приватные методы

Метод Описание
CreateBasketString ( string merchantReference, decimal amount ) : string
ExtractStatus ( string pair ) : PaymentStatus
FormatPostData ( string>.IDictionary data ) : string
MakePostData ( ) : string>.IDictionary
ParseResponse ( string postResponse ) : PaymentResponse
PopulateResponseProperty ( PaymentResponse response, string pair ) : void
Tokenize ( string postResponse ) : IEnumerable
TranslateCardType ( CardType cardType ) : string

Описание методов

Accepts() публичный Метод

public Accepts ( Currency currency, CardType cardType ) : bool
currency System.Currency
cardType CardType
Результат bool

Purchase() публичный Метод

Attempts to debit the specified amount from the supplied payment card.
Because the SagePay gateway requires a shopping basket, this overload will create a simple basket containing a single line item whose description is auto-generated from the supplied order details.
public Purchase ( string merchantReference, Kurejito.Payments.Money amount, PaymentCard card ) : PaymentResponse
merchantReference string
amount Kurejito.Payments.Money
card Kurejito.Payments.PaymentCard
Результат PaymentResponse

SagePayPaymentGateway() публичный Метод

Construct a new SagePayPaymentGateway that uses the supplied IHttpPostTransport to communicate with the remote server.
public SagePayPaymentGateway ( IHttpPostTransport http, string vendorName, decimal vpsProtocol, GatewayMode mode ) : System
http IHttpPostTransport An instance of a class implementing to provide HTTP POST capabilities.
vendorName string The vendor name used by this SagePay installation.
vpsProtocol decimal The version of the VPS Protocol used by the remote SagePay system.
mode GatewayMode
Результат System