Wednesday, October 15, 2014

How To Customize XSL Template For Oracle SEPA Payments


Example 1:  Let’s say if a particular bank requires ‘BankAccountNumber (123456789)’ to be passed in the IBAN field, then how do we customize the XSL template with respect to mapping?
XML Extract Input
(+)
XSL Template Mapping (Seeded)
=
Generated Output
In the XSL template, mapping needs to be changed to refer to ‘BankAccountNumber’. Here is the modified version of XSL template
XSL Modified Template Mapping
=
Generated Output
Example 2:  How do we send the ‘Ctrlsum’ value with a different number format? Requirement is to pass the amount value with a comma (,) separator?
XML Extract Input
(+)
XSL Template Mapping (Seeded)
=
Generated Output
In the XSL template, the required format needs to be passed in the format_number function
XSL Modified Template Mapping (Customized)
Generated Output
Example 3: Banks require some additional data to be sent in the output. However, the data is not extracted in the original XML extract. How do we achieve this requirement?
  1. Enable DFF on the Bank Account setup Page. Set values as per requirement
  1. The DFF information shows up in the XML extract with the tag <DescriptiveFlexField>
  1. Map this information in the XSL template. Customers are not supposed to touch the seeded template. The below changes should be carried out on a Customized template. Custom1/2/3/4 are the new tags that were added as per the bank requirement and it is mapped to ‘Attribute1/2/3/4’.
  1. Generated Output
.
Example 4: Since our XSLT parsers are on 1.0 version, how do you get current date in the XSLT TEMPLATE?
  1. Define name space ‘java’ in the template
  1. Invoke java function
<CurrentDate><xsl:value-of select="java:format(java:java.text.SimpleDateFormat.new('yyyy-MM-dd'), java:java.util.Date.new())" /></CurrentDate>
  1. Generated output
Example 5: XML Extract Customization (Applicable for Funds Disbursement Only). The following example shows how to utilize the extract extensibility feature
  1. IBY provides an extensibility package ‘IBY_FD_EXTRACT_EXT_PUB’ which can be utilized to pass user defined elements in the extract. The package has hooks at different levels of payment processing:
  • Instruction Level
  • Payment Level
  • Invoice Level
  • Invoice Line Level
  • PPR Level
  1. Let’s take an example of passing user defined elements at the payment Level
  • One  Sample table was created for demo purposes
  • One record was inserted into the table
  1. Implement the function ‘IBY_FD_EXTRACT_EXT_PUB.Get_Pmt_Ext_Agg’
  1. The resulting Extract would be as follows for the corresponding payment id
  1. Mapping the extensibility elements in the XSL Template
Example 6: How to restrict the length of a specific attribute to a certain number of characters. For e.g. trimming payer name to 7 characters length
XML Extract Input
XSL Template Mapping(Modified)
Generated Output

No comments:

Post a Comment

Best Blogger TipsGet Flower Effect