ePages 6.17.48 - DE_EPAGES/SagePay/API/Payment.pm

Package DE_EPAGES::SagePay::API::Payment

Payment functions for SagePay.

@EXPORT_OK
IsOnePaymentMethodInLiveMode
GetSagePayPaymentMethods
GetRegisterURLByCountryCode2
RegisterTransaction
ProcessSagePayCallback

Functions

GetRegisterURLByCountryCode2
GetSagePayPaymentMethods
IsOnePaymentMethodInLiveMode
ProcessSagePayCallback
RegisterTransaction

GetRegisterURLByCountryCode2

gives the the register url depending to the country code

Syntax
GetRegisterURLByCountryCode2( $CountryCode2 );
Input
$CountryCode2 (String)
country code type 2
Return
$RegisterURL (String)
Register URL

GetSagePayPaymentMethods

give a array reference with all Sagepay payment methods wich belog to this current shop

Syntax
GetSagePayPaymentMethods( $Servlet );
Input
$Servlet (object)
current servlet
Return
\@SagePayPaymentMethods (refarray)
SagePay payment methods

IsOnePaymentMethodInLiveMode

returns a 1 (true) if one of all sagepay payment methods which belongs to this shop is actualy in live mode

Syntax
IsOnePaymentMethodInLiveMode( $Servlet );
Input
$aSagePayPaymentMethods (refArray)
sagepay payment methods
Return
$isInLiveMode (boolean)
is one payment method in live mode

ProcessSagePayCallback

check the SagePay callback request parameters and send the response, update PaymentLineItem

Syntax
ProcessSagePayCallback( $Servlet );
Input
$Servlet (object)
current servlet (contains form data)
Return
void

RegisterTransaction

send the registration request to SagePay to initiate a payment transaction

Syntax
RegisterTransaction( $PaymentLineItem );
Input
$PaymentLineItem (object)
the payment lineitem
Return
$NextURL (string)
URL where the buyer must be redirected