Manual Outgoing Payment Requests
This functionality lets you manually add, approve or pay the Outgoing Payments Requests received from different sources or systems.
Entity FTOS_PYMT_OutgoingPayment with all attributes.
Form Client Side Scripts
In order to show the results, the following functions are used:
This function sets some form fields to ReadOnly, based on the entity business status.
Input parameters: N/A.
Output parameters: N/A.
This function hides some form steps depending on the business status or if the form is in Edit mode.
Input parameters: N/A.
Output parameters: N/A.
This function performs the following actions:
-
Gets the bank details based on the bank code, from the
iban
parameter. -
Checks the result and throws a warning message if the validity condition (bank code) is not met.
-
If there is no result the function displays a warning message.
-
Upon a valid result, the function sets the
bankId
, to be used later on for completing the form field.
Input parameters:
-
iban
- The string of characters introduced in the IBAN form field. -
ibanType
- The type of the IBAN, used for differentiating between the beneficiary details and the payer ones.
Output parameters: N/A.
Depending on the ibanType
, this function calls the previous function getBank()
with a different iban
parameter for getting the correct bank details.
Input parameters: iban
- The type of the IBAN - let's you know which form field you get the value from.
Output parameters: N/A.
This function calls the previous function completeBankOnIban()
at step loading and also on a form field change, for the IBAN.
Input parameters: N/A.
Output parameters: N/A.
This function executes the following actions:
-
Calls the
FTOS_PYMT_OutgoingPayment_CompletePayerDetails
endpoint; -
Sends an object to this endpoint, containing the
currencyId
; -
If the response from the endpoint is different than
null
, the function sets some form fields with the corresponding data.
Input parameters: N/A.
Output parameters: N/A.
This function only calls the previous function callCompletePayerDetailsEndpoint() on a form field change(currencyId).
Input parameters: N/A.
Output parameters: N/A.
This function hides or shows the proposal and cancellation buttons depending on the entity business status.
1. The Proposal button functionality includes the following actions:
-
Saves the data introduced in the form fields.
-
Calls the
ProposePaymentReturnValidation
endpoint. -
Redirects the user back to the current request, if the case.
-
Reloads the page, if the form is in edit mode.
2. The Cancellation button calls theFTOS_INSP_Payment_cancelPaymentReturn
endpoint and refreshes the page, after the response was received.
Input parameters: N/A.
Output parameters: N/A.
This function gets the full name of the outgoing payment's beneficiary by calling the FTOS_INSP_GetAccountData_UniqueIdNo
endpoint.
Input parameters: N/A.
Output parameters: N/A.
Endpoints
The endpoint fetches the account details from the Account entity based on the unique identifier - PIN for an individual person and FiscalRegistrationNo for a legal person.
After the fetch, the endpoint uses the setData()
method to send the obtained data to the client side for populating the required fields. The endpoint calls the getAccountDataByUniqueIdNo()
function from the FTOS_GetAccountData server side script library.
This endpoint performs two different actions on an outgoing payment:
-
Change the business status into Proposed.
-
Update the
proposalDate
attribute of the outgoing payment with the current date.
This endpoint is used for changing the outgoing payment business status.
This endpoint is called when the Payment No field changes to get data from the FTOS_PYMT_Payment entity based on it’s value. The endpoint uses the obtained values to populate the Payer Details section fields.
Server Side Script Libraries
FTOS_GetAccountData
This library contains functions for fetching data from or inserting data into the Account entity, based on different conditions. From this library, the following function is used:
This function runs a fetch on the Account entity to retrieve some attributes, based on the unique identifier value.
Input parameters: uniqueIdentifier
- The unique identifier for each account, based on the account type - PIN for an individual person and FiscalRegistrationNo for a legal person.
Output parameters: acc[0]
- The first account found by the fetch containing the required details.
FTOS_OutgoingPaymentRequest
This library contains functions for inserting, updating and manipulating data used in the outgoing payment request process. From this library, the following functions are used:
This function updates some attributes from the FTOS_PYMT_OutgoingPayment entity for an outgoing payment with a specific Id.
Input parameters:
-
requestId
- The Id of the outgoing payment request. -
paymentNo
- The value of the payment number field filled in at a new insert.
Output parameters: N/A.
The function updates the approvedBy and the approvedBy_displayname attributes for an outgoing payment based on a specific Id.
Input parameters:
-
requestId
- The Id of the outgoing payment request. -
userId
- The Id of an existing user. -
userName
- The full name of an existing user.
Output parameters: N/A.
The function updates the paidAmount
and the unpaidAmount
attributes for an outgoing payment based on the specified Id.
Input parameters:
-
requestId
- The Id of the outgoing payment request. -
paymAmount
- The value of the payment amount field, received from the client-side.
Output parameters: N/A.
The payment scheduled date inserted in a request form for an outgoing payment has to be greater than or equal to the current date. If the scheduled date is less than the current date, the system throws an error.
Input parameters: sheduledDate
- The date object containing the details about the outgoing payment schedule.
Output parameters: N/A.
The function fetches, based on the Id, some details from the Account entity for an account.
Input parameters: accId
- The Id of the account.
Output parameters: accounts
- The list containing the account that has been found by the fetch.
If there is no account with a specific uniqueIdNo
, the function gets the Id of the selected account type and inserts that Id on the Account entity, along with a set of attributes.
Input parameters:
-
paymBenId
- The Id of an account. -
name
- The full name of the beneficiary. -
firstName
- The first name of the beneficiary. -
lastName
-The last name of the beneficiary. -
beneficiaryType
-The Id of the selected optionset item . -
uniqueIdNo
- The unique identifier for an account.
Output parameters: N/A.
This function checks if an existing account is going to be updated by comparing the stored data with the data received from the form. If the new data is different, the function goes ahead and updates the attributes for the selected account.
Input parameters:
-
paymBenId
-The Id of an account. -
name
-The full name of the beneficiary. -
firstName
-The first name of the beneficiary. -
lastName
-The last name of the beneficiary.
Output parameters: N/A.
The function contains a fetch performed on the FTOS_PYMT_OutgoingPayment entity based on a specific Id.
Input parameters: opId
-The Id of an outgoing payment.
Output parameters: outgoingPayment
- The list containing the outgoing payments found by the fetch.
The function contains a fetch performed on the FTOS_PYMT_Payment entity based on a specific Id.
Input parameters: pId
-The Id of a payment.
Output parameters: payment
-The list containing the payments found by the fetch
The function changes the business status of an outgoing payment with the one received as a parameter and if it finds a payment with a specific sourcePaymentId
, it updates a couple of its attributes.
Input parameters:
-
paymId
-The Id of an outgoing payment. -
paymAmount
- The numeric value of the payment amount. -
newBS
- The new business status of the outgoing payment.
Output parameters: N/A.
This function checks if an existing account name is going to be updated by comparing the stored data with the data received from the form. If the new data is different, the function goes ahead and updates the beneficiaryName
attribute for the selected account.
Input parameters:
-
opReqId
- The Id of an outgoing payment request. -
name
- The full name of the beneficiary. -
firstName
- Thefirst name of the beneficiary. -
lastName
- The last name of the beneficiary. -
beneficiaryCategoryId
- The Id of the account category type.
Output parameters: N/A.
The function maps all the data inside a JSON processor.
Input parameters:
-
currency
- An object containing the currency details. -
processor
- An object containing the data from the processor.
Output parameters: result
- An object containing all the mapped data from the processor.
The function contains the fetch performed on the FTOS_CMB_Currency entity based on a specific Id.
Input parameters: currencyId
- The Id of a currency.
Output parameters: currency[0]
- The currency found by the fetch.
This function goes on an gets the data from the FTOS_PYMT_OutgoingPayments_PayerDetails
processor from which we select the related data to the currency code of the selected currency.
This function gets the payer data from the FTOS_PYMT_OutgoingPayments_PayerDetails
processor based on the selected currency code .
Input parameters: currencyId
- The Id of a currency.
Output parameters:payerDetails
- An object containing the payer name and the IBAN.