ePages 7.17.0 - DE_EPAGES/Paybox/API/GatewayInterface/Implementations/PaymentGateway.pm

Package DE_EPAGES::Paybox::API::GatewayInterface::Implementations::PaymentGateway

Test PaymentGateway implementation.

Base
DE_EPAGES::Paybox::API::GatewayInterface::PaymentGateway

Functions

_mapPayboxCodeToOperation
cancelPayment
capturePayment
checkPaymentResponse
getPayboxDirectURL
getPaymentRequestData
getPaymentRequestURL
processPaymentResponse

_mapPayboxCodeToOperation

Maps the Paybox code to the Payment related operation (ACCEPTED, CANCELLED, ...)

Syntax
$Operation = $PaymentGateway->_mapPayboxCodeToOperation($PayboxCode);
Input
$PayboxCode (string)
The Paybox result code
Return
$Operation (string)
The Payment operation code

cancelPayment

Cancels a payment that has previously been captured.

Syntax
$PaymentGateway->cancelPayment($Shop, $LineItemPayment);
Input
$Shop (object)
shop in which the payment has been authorized
$LineItemPayment (object)
line item that represents the authorized payment
Return
$hResult (hash.ref)
The result of the operation.
success 1 if the operation was successful
error_message error message in case an error occured

capturePayment

Captures a payment that has previously been authorized.

Syntax
$PaymentGateway->capturePayment($Shop, $LineItemPayment);
Input
$Shop (object)
shop in which the payment has been authorized
$LineItemPayment (object)
line item that represents the authorized payment
Return
$hResult (hash.ref)
The result of the operation.
success 1 if the operation was successful
error_message error message in case an error occured

checkPaymentResponse

Validates the backlink request (browser redirect) by checking the query string and its SHA1 signature. A hash contained the corresponding order or error is returned.

Syntax
$PaymentGateway->checkPaymentResponse($hPaymentContext);
Input
$hPaymentContext (hash.ref)
The information needed to process the request:
Shop The Shop object for the request
Query The request paramas (Servlet->paramas)
Dispatcher The PaymentDispatcher object to delegate the process
Return
$hResult (hash.ref)
The result of the operation.

getPayboxDirectURL

Returns the PayboxDirect URL which can be used to perform PayboxDirect requests.

Syntax
my $PayboxDirectURL = $PaymentGateway->getPayboxDirectURL();
Return
$PayboxDirectURL (string)
PayboxDirect URL

getPaymentRequestData

Returns a test data for a payment request

Syntax
$aData = $PaymentGateway->getPaymentRequestData($LineItemPayment);
Input
$LineItemPayment (object)
A LineItemPayment object to prepare the request data
Return
$RequestData (array.ref)
Array of N hash items { Field, Value }

getPaymentRequestURL

Returns a PaymentGateway Test Request URL

Syntax
my $RequestURL = $PaymentGateway->getPaymentRequestURL();
Return
$RedirectURL (string)
The GatewayPayment Test URL

processPaymentResponse

Validates the callback request (direct Paybox call) by checking the query string and its SHA1 signature. If it is OK then the payment process is delegated to a PaymentDispatcher object

Syntax
$PaymentGateway->processPaymentResponse($hPaymentContext);
Input
$hPaymentContext (hash.ref)
The information needed to process the request:
Shop The Shop object for the request
Query The request paramas (Servlet->paramas)
Dispatcher The PaymentDispatcher object to delegate the process