EPG PHP SDK
Loading...
Searching...
No Matches
BaseTransaction Class Reference
+ Inheritance diagram for BaseTransaction:

Public Member Functions

 setProduct (string $product)
 Sets the product information for the transaction.
 
 setConfirmationCartData (string $confirmationCartDataUrl)
 Set the URL for confirmation cart data.
 
 setDisableFormEdition (bool $value)
 
 setCustomerUserAgent (string $userAgent)
 Sets the customer's user agent information.
 
 setCustomerTitle (string $title)
 Sets the title of the customer.
 
 setCustomerDocumentExpirationDate (string $documentExpirationDate)
 Sets the document expiration date for the customer.
 
 setCustomerLoggedIn (bool $loggedIn)
 Sets the customer's login status.
 
 setCustomerLocale (LanguageCodes $locale)
 Sets the customer's locale.
 
 setShippingMethod (string $method)
 Sets the shipping method for the transaction.
 
 setShippingName (string $name)
 Sets the shipping name, typically the name of the shipping service.
 
 setShippingFirstName (string $firstName)
 Sets the first name of the shipping recipient.
 
 setShippingLastName (string $lastName)
 Sets the last name of the shipping recipient.
 
 setShippingCompany (string $company)
 Sets the company name associated with the shipping address.
 
 setShippingPhoneNumber (string $phoneNumber)
 Sets the phone number for shipping contact.
 
 setShippingEmail (string $email)
 Sets the email address for shipping notifications.
 
 setBilling (Billing $billing)
 Sets the billing information using the Billing object.
 
 setCartCurrency (CurrencyCodes $currency)
 Sets the currency for the cart.
 
 setCartTotalPriceWithTax (float $totalPrice)
 Sets the total price of the cart, including tax.
 
 setCartReference (int $reference)
 Sets a reference number or identifier for the cart.
 
 getCartTotalPriceWithTax ()
 Retrieves the total price with tax of the items in the cart.
 
 getItems ()
 Get the cart items data as an array.
 
 getData ()
 Get all transaction data as an array.
 
 calculateTotalItemPrice ()
 Calculates the total price of all items in the cart.
 
 validate ()
 
 process ()
 

Protected Attributes

array $data = []
 

Member Function Documentation

◆ calculateTotalItemPrice()

calculateTotalItemPrice ( )

Calculates the total price of all items in the cart.

Returns
float The total price of items.

◆ getCartTotalPriceWithTax()

getCartTotalPriceWithTax ( )

Retrieves the total price with tax of the items in the cart.

Returns
int The total price with tax.

◆ getData()

getData ( )

Get all transaction data as an array.

Returns
array Returns an array containing all transaction data.

◆ getItems()

getItems ( )

Get the cart items data as an array.

Returns
array Returns an array containing cart items data.

◆ process()

process ( )

◆ setBilling()

setBilling ( Billing  $billing)

Sets the billing information using the Billing object.

Parameters
Billing$billingThe Billing object containing billing information.
Returns
self Returns the instance of the class for method chaining.

◆ setCartCurrency()

setCartCurrency ( CurrencyCodes  $currency)

Sets the currency for the cart.

Parameters
CurrencyCodes$currencyThe currency code.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionIf the currency code is invalid.

◆ setCartReference()

setCartReference ( int  $reference)

Sets a reference number or identifier for the cart.

Parameters
int$referenceA unique reference number for the cart.
Returns
self Returns the instance of the class for method chaining.

◆ setCartTotalPriceWithTax()

setCartTotalPriceWithTax ( float  $totalPrice)

Sets the total price of the cart, including tax.

Parameters
float$totalPriceThe total price of all items in the cart including tax.
Returns
self Returns the instance of the class for method chaining.

◆ setConfirmationCartData()

setConfirmationCartData ( string  $confirmationCartDataUrl)

Set the URL for confirmation cart data.

Parameters
string$confirmationCartDataUrlThe URL for confirmation cart data.
Returns
self Returns the instance of the class for method chaining.

◆ setCustomerDocumentExpirationDate()

setCustomerDocumentExpirationDate ( string  $documentExpirationDate)

Sets the document expiration date for the customer.

Parameters
string$documentExpirationDateThe expiration date of the customer's identification document.
Returns
self Returns the instance of the class for method chaining.

◆ setCustomerLocale()

setCustomerLocale ( LanguageCodes  $locale)

Sets the customer's locale.

Parameters
LanguageCodes$localeThe login status of the customer (e.g., 'es' or 'en').
Returns
self Returns the instance of the class for method chaining.

◆ setCustomerLoggedIn()

setCustomerLoggedIn ( bool  $loggedIn)

Sets the customer's login status.

Parameters
bool$loggedInThe login status of the customer (e.g., 'true' or 'false').
Returns
self Returns the instance of the class for method chaining.

◆ setCustomerTitle()

setCustomerTitle ( string  $title)

Sets the title of the customer.

Parameters
string$titleThe title of the customer (e.g., Mr., Ms., Dr.).
Returns
self Returns the instance of the class for method chaining.

◆ setCustomerUserAgent()

setCustomerUserAgent ( string  $userAgent)

Sets the customer's user agent information.

Parameters
string$userAgentThe user agent of the customer.
Returns
self Returns the instance of the class for method chaining.

◆ setDisableFormEdition()

setDisableFormEdition ( bool  $value)

◆ setProduct()

setProduct ( string  $product)

Sets the product information for the transaction.

Parameters
string$productThe product identifier.
Returns
self Returns the instance of the class for method chaining.

◆ setShippingCompany()

setShippingCompany ( string  $company)

Sets the company name associated with the shipping address.

Parameters
string$companyThe company name for the shipping address.
Returns
self Returns the instance of the class for method chaining.

◆ setShippingEmail()

setShippingEmail ( string  $email)

Sets the email address for shipping notifications.

Parameters
string$emailThe email address for shipping updates.
Returns
self Returns the instance of the class for method chaining.

◆ setShippingFirstName()

setShippingFirstName ( string  $firstName)

Sets the first name of the shipping recipient.

Parameters
string$firstNameThe first name of the recipient.
Returns
self Returns the instance of the class for method chaining.

◆ setShippingLastName()

setShippingLastName ( string  $lastName)

Sets the last name of the shipping recipient.

Parameters
string$lastNameThe last name of the recipient.
Returns
self Returns the instance of the class for method chaining.

◆ setShippingMethod()

setShippingMethod ( string  $method)

Sets the shipping method for the transaction.

Parameters
string$methodThe shipping method (e.g., 'Standard', 'Express').
Returns
self Returns the instance of the class for method chaining.

◆ setShippingName()

setShippingName ( string  $name)

Sets the shipping name, typically the name of the shipping service.

Parameters
string$nameThe name of the shipping service.
Returns
self Returns the instance of the class for method chaining.

◆ setShippingPhoneNumber()

setShippingPhoneNumber ( string  $phoneNumber)

Sets the phone number for shipping contact.

Parameters
string$phoneNumberThe phone number for shipping communications.
Returns
self Returns the instance of the class for method chaining.

◆ validate()

validate ( )
Returns
void

Member Data Documentation

◆ $data

array $data = []
protected

The documentation for this class was generated from the following file: