ePages 7.0.0 - DE_EPAGES/PayPalPlus/API/PaymentLineItemService.pm

Package DE_EPAGES::PayPalPlus::API::PaymentLineItemService

provides methods in order to load a CustomerOrder by Guid of LineItemPaymentPayPalPlus and validate loaded data.

Functions

_GetError
_LoadObjectByGUID
_LogError
canLoadByGuid
getBasketOrOrder
getErrorMessage
getLineItemPayment
getPaymentId
new
setPayerId
updateStatus

_GetError

wrapps function to get errors

Syntax
_GetError();
Return
$Error (DE_EPAGES::Core::API::Error)
Error

_LoadObjectByGUID

wrapps function to load a object by guid

Syntax
_LoadObjectByGUID( $GUID );
Input
$GUID (string)
general unique id of the object
Return
$Object (object)
object

_LogError

wrapps function to log errors

Syntax
_LogError( $Error );
Input
$Error (DE_EPAGES::Core::API::Error)
error to log
Return
1 (boolean)
always 1

canLoadByGuid

tries to load a valid CustomerOrder by loading the LineItemPayment by Guid On success: the loaded CustomerOrder, LineItemContainer, LineItemPaymentPayPalPlus are stored internally

Syntax
canLoadByGuid( $Guid );
Input
$Guid (string)
a guid of a LineItemPayment
Return
(boolean
0: Order couldn't be loaded)
1: Order was loaded successfully

getBasketOrOrder

gets the recently loaded CustomerOrder or Basket

Syntax
getBasketOrOrder();
Return
recently loaded CustomerOrder, (DE_EPAGES::Order::API::Object::Basket)
DE_EPAGES::Order::API::Object::CustomerOrder
recently loaded Basket,

getErrorMessage

returns the Error Message

Syntax
getErrorMessage(  );
Return
$ErrorMessage (string)
Error Mesage

getLineItemPayment

gets the recently loaded LineItemPaymentPayPalPlus

Syntax
getLineItemPayment();
Return
(DE_EPAGES::PayPalPlus::API::Object::LineItemPaymentPayPalPlus)
recently loaded LineItemPaymentPayPalPlus,

getPaymentId

gets the getPaymentId

Syntax
getPaymentId();
Return
(string)
PaymentID

new

constructor

Syntax
new( );
Return
$self (DE_EPAGES::PayPalPlus::API::PaymentLineItemService)
self

setPayerId

sets the passed payer id to the currently loaded order.

Syntax
setPayerId( $PayerID );
Input
$PayerID (string)
PayerID

updateStatus

update status for order and lineItemPayment based on the paypal Status

Syntax
updateStatus($NewStatusFromPaypal);
Input
$NewStatusFromPaypal
string