EPG PHP SDK
Loading...
Searching...
No Matches
ParametersInterface Class Reference

Abstract class representing the interface for setting parameters required for payment requests. More...

+ Inheritance diagram for ParametersInterface:

Public Member Functions

 __construct ()
 
 setMerchantTransactionId (string $merchantTransactionId)
 Sets the merchant transaction ID.
 
 setAmount (float $amount)
 Sets the amount for the transaction.
 
 getAmount ()
 
 setProductId (int $productId)
 
 setCurrency (CurrencyCodes $currency)
 Sets the currency code for the transaction.
 
 setCountry (CountryCodes $country)
 Sets the country code.
 
 setApiVersion (int $version)
 Sets the Api Version.
 
 setCustomerId (string $customerId)
 Sets the customer ID.
 
 setPaymentSolution (PaymentSolutions $paymentSolution)
 Sets the payment solution for the transaction.
 
 setLanguage (LanguageCodes $language)
 Sets the language for the payment interface.
 
 setType (Types $type)
 Sets the transaction type.
 
 isUrl (string $string)
 
 setStatusURL (string $statusURL)
 Sets the URL to which the transaction status will be sent.
 
 setAwaitingURL (string $awaitingURL)
 Sets the URL for redirecting the user during the payment process if additional actions are required.
 
 setSuccessURL (string $successURL)
 Sets the URL to which the customer will be redirected after a successful transaction.
 
 setErrorURL (string $errorURL)
 Sets the URL to which the customer will be redirected after a transaction error.
 
 setCancelURL (string $cancelURL)
 Sets the URL to which the customer will be redirected if they cancel the transaction.
 
 setCustomerEmail (string $customerEmail)
 Sets the customer's email address.
 
 setCustomerNationalId (string $customerNationalId)
 Sets the national ID of the customer.
 
 setCustomerCountry (CountryCodes $customerCountry)
 Sets the country code of the customer.
 
 setDob (string $dob)
 Sets the date of birth of the customer.
 
 setFirstName (string $firstName)
 Sets the first name of the customer.
 
 setLastName (string $lastName)
 Sets the last name of the customer.
 
 setChName (string $chName)
 Sets the card holder's name.
 
 setReferenceId (string $referenceId)
 Sets the Reference Id.
 
 setDescription (string $description)
 Sets Description.
 
 setChallengeInd (string $challengeInd)
 Sets Challenge Ind.
 
 setShowRememberMe (bool $showRememberMe)
 Sets Show Remember Me.
 
 setMerchantParams (array $params)
 Sets Merchant Params.
 
 setTransactionId (int $transactionId)
 Sets the transaction ID.
 
 setForceTokenRequest (bool $forceTokenRequest)
 Sets the force token request flag.
 
 setAnonymousCustomer (bool $anonymousCustomer)
 Sets the anonymous customer flag.
 
 setPrepayToken (string $prepayToken)
 Sets the prepayment token.
 
 setAdditionalParameters (string $key, mixed $value)
 Sets additional parameters for the transaction.
 
 addAcceptJsonHeader (bool $json)
 Adds a header to accept JSON responses.
 
 getOtherConfigurations ()
 Retrieves all other configurations set for the transaction.
 
 isValidEmail (string $email)
 Validates if the provided string is a valid email address.
 
 validate ()
 

Protected Attributes

array $otherConfigurations = []
 
bool $isSettingPaysolExtendedData = false
 

Detailed Description

Abstract class representing the interface for setting parameters required for payment requests.

This class provides methods to set various configurations and parameters needed for payment processing.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Reimplemented in QuixParameters.

Member Function Documentation

◆ addAcceptJsonHeader()

addAcceptJsonHeader ( bool  $json)

Adds a header to accept JSON responses.

Parameters
bool$jsonA boolean flag to indicate if JSON responses are to be accepted.
Returns
self Returns the instance of the class for method chaining.

◆ getAmount()

getAmount ( )

◆ getOtherConfigurations()

getOtherConfigurations ( )

Retrieves all other configurations set for the transaction.

Returns
array An associative array of all configurations.

◆ isUrl()

isUrl ( string  $string)

◆ isValidEmail()

isValidEmail ( string  $email)

Validates if the provided string is a valid email address.

Parameters
string$emailThe email address to validate.
Returns
bool Returns true if the email address is valid, false otherwise.

◆ setAdditionalParameters()

setAdditionalParameters ( string  $key,
mixed  $value 
)

Sets additional parameters for the transaction.

Parameters
string$keyThe key for the additional parameter.
mixed$valueThe value of the additional parameter.
Returns
self Returns the instance of the class for method chaining.

◆ setAmount()

setAmount ( float  $amount)

Sets the amount for the transaction.

Parameters
float$amountThe transaction amount.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided amount is not a valid number.

◆ setAnonymousCustomer()

setAnonymousCustomer ( bool  $anonymousCustomer)

Sets the anonymous customer flag.

Parameters
mixed$anonymousCustomerThe anonymous customer flag, should be 'true' or 'false' as a string.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided value is not a valid boolean representation.

◆ setApiVersion()

setApiVersion ( int  $version)

Sets the Api Version.

Parameters
int$version
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided country code is not valid.

◆ setAwaitingURL()

setAwaitingURL ( string  $awaitingURL)

Sets the URL for redirecting the user during the payment process if additional actions are required.

Parameters
string$awaitingURLThe URL for redirecting during awaiting actions.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided URL is not valid.

◆ setCancelURL()

setCancelURL ( string  $cancelURL)

Sets the URL to which the customer will be redirected if they cancel the transaction.

Parameters
string$cancelURLThe cancel URL for post-transaction redirection.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided URL is not valid.

◆ setChallengeInd()

setChallengeInd ( string  $challengeInd)

Sets Challenge Ind.

Parameters
string$referenceIdPreference on the type of 3DSv2 authentication to request from the client.
Returns
self Returns the instance of the class for method chaining.

◆ setChName()

setChName ( string  $chName)

Sets the card holder's name.

Parameters
string$chNameThe name of the card holder.
Returns
self Returns the instance of the class for method chaining.

◆ setCountry()

setCountry ( CountryCodes  $country)

Sets the country code.

Parameters
CountryCodes$countryThe country code (ISO 3166-1 alpha-2 format).
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided country code is not valid.

◆ setCurrency()

setCurrency ( CurrencyCodes  $currency)

Sets the currency code for the transaction.

Parameters
CurrencyCodes$currencyThe currency code (e.g., 'EUR', 'USD').
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided currency code is not valid.

◆ setCustomerCountry()

setCustomerCountry ( CountryCodes  $customerCountry)

Sets the country code of the customer.

Parameters
CountryCodes$customerCountryThe ISO country code of the customer.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided country code is not valid.

◆ setCustomerEmail()

setCustomerEmail ( string  $customerEmail)

Sets the customer's email address.

Parameters
string$customerEmailThe email address of the customer.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided email address is not valid.

◆ setCustomerId()

setCustomerId ( string  $customerId)

Sets the customer ID.

Parameters
string$customerIdThe customer identifier in the merchant's platform.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided ID is not an integer.

◆ setCustomerNationalId()

setCustomerNationalId ( string  $customerNationalId)

Sets the national ID of the customer.

Parameters
string$customerNationalIdThe national ID of the customer.
Returns
self Returns the instance of the class for method chaining.

◆ setDescription()

setDescription ( string  $description)

Sets Description.

Parameters
string$referenceIdDescription of the transaction. Preference on the type of 3DSv2 authentication to request from the client. It does not affect the transaction, it serves so that you can make a better identification.
Returns
self Returns the instance of the class for method chaining.

◆ setDob()

setDob ( string  $dob)

Sets the date of birth of the customer.

Parameters
string$dobThe date of birth in the format d-m-Y.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided date is not in the valid format.

◆ setErrorURL()

setErrorURL ( string  $errorURL)

Sets the URL to which the customer will be redirected after a transaction error.

Parameters
string$errorURLThe error URL for post-transaction redirection.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided URL is not valid.

◆ setFirstName()

setFirstName ( string  $firstName)

Sets the first name of the customer.

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

◆ setForceTokenRequest()

setForceTokenRequest ( bool  $forceTokenRequest)

Sets the force token request flag.

Parameters
mixed$forceTokenRequestThe force token request flag, should be true or false.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided value is not a valid boolean representation.

◆ setLanguage()

setLanguage ( LanguageCodes  $language)

Sets the language for the payment interface.

Parameters
LanguageCodes$languageThe language code (e.g., 'EN', 'ES').
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided language code is not valid.

◆ setLastName()

setLastName ( string  $lastName)

Sets the last name of the customer.

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

◆ setMerchantParams()

setMerchantParams ( array  $params)

Sets Merchant Params.

Parameters
array$paramsParameters that are sent to modify the configuration of the trade or the processing of a transaction. They are received back inside the label Does not support special characters.
Returns
self Returns the instance of the class for method chaining.

◆ setMerchantTransactionId()

setMerchantTransactionId ( string  $merchantTransactionId)

Sets the merchant transaction ID.

Parameters
string$merchantTransactionIdThe transaction identifier in the merchant's platform.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided ID is not an integer.

◆ setPaymentSolution()

setPaymentSolution ( PaymentSolutions  $paymentSolution)

Sets the payment solution for the transaction.

Parameters
PaymentSolutions$paymentSolutionThe payment solution name (e.g., 'creditcards', 'paypal').
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided payment solution is not valid.

◆ setPrepayToken()

setPrepayToken ( string  $prepayToken)

Sets the prepayment token.

Parameters
string$prepayTokenThe prepayment token to be used for the transaction.
Returns
self Returns the instance of the class for method chaining.

◆ setProductId()

setProductId ( int  $productId)

◆ setReferenceId()

setReferenceId ( string  $referenceId)

Sets the Reference Id.

Parameters
string$referenceIdVariable reference for businesses that need FB500 reconciliation files..
Returns
self Returns the instance of the class for method chaining.

◆ setShowRememberMe()

setShowRememberMe ( bool  $showRememberMe)

Sets Show Remember Me.

Parameters
bool$showRememberMeif the value is true the remember me box will be visible to the user if false it will be hidden (true by default ).
Returns
self Returns the instance of the class for method chaining.

◆ setStatusURL()

setStatusURL ( string  $statusURL)

Sets the URL to which the transaction status will be sent.

Parameters
string$statusURLThe URL for receiving transaction status updates.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided URL is not valid.

◆ setSuccessURL()

setSuccessURL ( string  $successURL)

Sets the URL to which the customer will be redirected after a successful transaction.

Parameters
string$successURLThe success URL for post-transaction redirection.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided URL is not valid.

◆ setTransactionId()

setTransactionId ( int  $transactionId)

Sets the transaction ID.

Parameters
int$transactionIdThe transaction ID.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the transaction ID is not an integer.

◆ setType()

setType ( Types  $type)

Sets the transaction type.

Parameters
Types$typeThe transaction type (e.g., 'ecom', 'moto').
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionif the provided type is not valid.

◆ validate()

validate ( )
Returns
void

Reimplemented in QuixParameters.

Member Data Documentation

◆ $isSettingPaysolExtendedData

bool $isSettingPaysolExtendedData = false
protected

◆ $otherConfigurations

array $otherConfigurations = []
protected

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