understanding payments output formatting, extracts and templates to bottom

35
R12/11i2: R12/11i2: Understanding Payments Output Formatting, Extracts and Templates [ID 799597.1] To Bottom Modified:Feb 2, 2012 Type:WHITE PAPER Status:PUBLISHED Priority:3 Comments In this Document Abstract Document History R12/11i2: Understanding Payments Output Formatting, Extracts and Templates Extracts and Templates Extracts Templates Importing a new custom template Other Helpful Documents Note on customizations Community Discussions Applies to: Oracle Payments - Version: 11.5.10.2 to 12.1.3 - Release: 11.5 to 12.1 Information in this document applies to any platform. Abstract iPayment (Payments Funds Capture Portion) is an engine that translates EBS data into 3rd Party Payment Systems (and Banks) data formats. Additionally it handles transmission and several other tasks. This document concentrates in the data formatting portion. Before 11i IBY.Q patchset data formatting was handled by specialized Java classes that step-by-step crafted the expected output for a given Payment System or Bank. While this approach is still supported by the product (E.g: Paypal Servlet is a 3rd party servlet that uses To Bo tt om

Upload: cariang123

Post on 27-Oct-2014

368 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: Understanding Payments Output Formatting, Extracts and Templates to Bottom

R12/11i2: R12/11i2: Understanding Payments Output Formatting, Extracts and Templates [ID 799597.1]

To Bottom

Modified:Feb 2, 2012 Type:WHITE PAPERStatus:PUBLISHED Priority:3

Comments (0)

In this Document  Abstract  Document History  R12/11i2: Understanding Payments Output Formatting, Extracts and Templates     Extracts and Templates     Extracts     Templates     Importing a new custom template     Other Helpful Documents        Note on customizations     Community Discussions

Applies to: Oracle Payments - Version: 11.5.10.2 to 12.1.3 - Release: 11.5 to 12.1Information in this document applies to any platform.AbstractiPayment (Payments Funds Capture Portion) is an engine that translates EBS data into 3rd Party Payment Systems (and Banks) data formats. Additionally it handles transmission and several other tasks.This document concentrates in the data formatting portion. Before 11i IBY.Q patchset data formatting was handled by specialized Java classes that step-by-step crafted the expected output for a given Payment System or Bank.While this approach is still supported by the product (E.g: Paypal Servlet is a 3rd party servlet that uses this old approach) from IBY.Q onwards iPayment leveraged BI Publisher (Formerly known as XML Publisher) as the centralized formatting engine eliminating the dependency on specialized classes and improving maintainability and supportability of the product.Document HistoryAuthor : The Oracle iPayment Global Support TeamCreate Date 02-APR-2009 Update Date 02-APR-2009 R12/11i2: Understanding Payments Output Formatting, Extracts and TemplatesExtracts and TemplatesTwo key concepts in the way iPayment formats data as per the requirements of 3rd Party Payment Systems or Banks are Extracts and Templates. Extracts and Templates work similarly to "mail merge" features of word processors. Data is on one side, templates on another, the merge process results in several documents with dynamic fields replaced in the template. In iPayment case the result

To Bottom

Page 2: Understanding Payments Output Formatting, Extracts and Templates to Bottom

is a single document with one or several entity records.BI Publisher (XDO) uses the same concept, Templates follow the same purpose and Extracts are the datasource in XML format. For iPayment interface with XDO the result is an e-Text document (plain text) as most of the Payment Systems and Banks require.Extract + Template = Formatted E-Text or XML OutputExtractsEvery time there is an online transaction or a batch transaction iPayment queries the extract for the same. The extract is an XML document produced by a complex hierarchy of database views that leverage the XML features of Oracle Server, the view output is a fully formatted XML document.For online transactions (Credit Card/Purchase Card Authorizations) the Extract contains information for a single entity, whereas for batch transactions (Batch Close, EFT Acct Xfer) the Extract contains information for as many entities (funds capture instructions) as there are in the batch.Extracts are gathered in package IBY_FNDCPT_EXTRACT_GEN_PVT (ibyfcxgb.pls) procedure Create_Extract_1_0Extract information (the first megabyte) was available in IBY Debug Log files up to BatchEFTPayment.class version 120.41.12000000.7, on higher versions extract information is no longer logged, however it can be obtained from the database as described in Note:752802.1The top level extract views are:IBY_XML_BATCH_FCI_1_0_V: For batch extracts IBY_XML_ONLINE_FCI_1_0_V: For online extracts The view dependency hierarchy can be scanned with the following helper script (it will not drill down other product views):create or replaceprocedure oss_iby_diag_explode_ev(pLevel number, pMv varchar2) is  cursor mvDepend is    select referenced_name, referenced_type      from dba_dependencies     where name = pMv      order by decode(referenced_type, 'TABLE', 1, 2);begin  if pLevel = 0 then    dbms_output.put_line('. Dependencies and rows for: '||pMv);  end if;  for i in mvDepend loop    if i.referenced_type = 'VIEW' and i.referenced_name like 'IBY%' then      dbms_output.put_line('.'||lpad('+-',pLevel+2)||'>'||i.referenced_name||                           ' (VIEW)');      oss_iby_diag_explode_ev(pLevel + 2,i.referenced_name);    else      dbms_output.put_line('.'||lpad('+-',pLevel+2)||'>'||i.referenced_name||                           ' ('||i.referenced_type||')');    end if;

Page 3: Understanding Payments Output Formatting, Extracts and Templates to Bottom

  end loop;end;/     SQL>set serveroutput on size 1000000    SQL>exec oss_iby_diag_explode_ev(0,'IBY_XML_BATCH_FCI_1_0_V');It will show the current hierarchy of dependencies for the top level view, e.g:. Dependencies and rows for: IBY_XML_BATCH_FCI_1_0_V.+->AGGXMLIMP (TYPE).+->IBY_TRXN_SUMMARIES_ALL (SYNONYM).+->XMLAGG (SYNONYM).+->XMLCONCAT (NON-EXISTENT).+->IBY_XML_FC_PRBA_1_0_V (VIEW).  +->XMLTYPE (TYPE).  +->XMLCONCAT (NON-EXISTENT).  +->IBY_EXT_FD_PRBA_1_0_V (VIEW).    +->IBY_FD_EXTRACT_GEN_PVT (PACKAGE).    +->CE_BANK_BRANCHES_V (VIEW).    +->IBY_UTILITY_PVT (PACKAGE)[...]The Extract views produce when queried (See Note:752802.1) an XML document containing all details for the Auth Request or all details for each line in a Batch.As Payment System requirements change, Extracts views change as well (if needed). At the time of writing this document Extract hierarchy for Batch isBatch Extract Sample- <FundsCaptureInstruction>- <InstructionInfo>    <InstructionInternalID>[value]</InstructionInternalID>     <InstructionName>[value]</InstructionName>     <InstructionCreationDate>[value]</InstructionCreationDate>     <InstructionSentDate>[value]</InstructionSentDate> -   <InstructionStatus>      <Code>[value]</Code>       <Meaning />       </InstructionStatus></InstructionInfo>- <InstructionSequence>    <SequenceName>[value]</SequenceName>     <LastValue>[value]</LastValue>  </InstructionSequence>- <InstructionTotals>    <PayeeAccountCount>[value]</PayeeAccountCount> -   <SettlementTotal>      <Value>[value]</Value> -     <Currency>        <Code />

Page 4: Understanding Payments Output Formatting, Extracts and Templates to Bottom

      </Currency>   </SettlementTotal></InstructionTotals>  <InstructionGrouping /> - <PayeeAccount>-   <PaymentSystemAccount>      <AccountName>[value]</AccountName> -     <AccountOption>        <Name>[value]</Name>         <Value>[value]</Value>      </AccountOption>       [several account options] -   </PaymentSystemAccount>-   <Payee>      <Name>[value]</Name>   </Payee>    <OrderCount>[value]</OrderCount> -   <AccountTotals>-     <AuthorizationsTotal>        <Value>[value]</Value> -       <Currency>          <Code>[value]</Code>        </Currency>    </AuthorizationsTotal>-     <CapturesTotal>        <Value>[value]</Value> -       <Currency>          <Code>[value]</Code>        </Currency>      </CapturesTotal>-     <CreditsTotal>        <Value>[value]</Value> -       <Currency>          <Code>[value]</Code>        </Currency>      </CreditsTotal>    </AccountTotals>-   <FundsCaptureOrder>-     <OrderSourceInfo>        <ApplicationInternalID>[value]</ApplicationInternalID>         <ApplicationName>[value]</ApplicationName>      </OrderSourceInfo>-     <OrderNumber>        <PayeeOrderNumber>[value]</PayeeOrderNumber>

Page 5: Understanding Payments Output Formatting, Extracts and Templates to Bottom

      </OrderNumber>      <PayeeBankAccount /> -     <OrderAmount>        <Value>[value]</Value> -       <Currency>          <Code>[value]</Code>        </Currency>      </OrderAmount>-     <PayeeLegalEntity>        <PartyInternalID>[value]</PartyInternalID>         <PartyNumber>[value]</PartyNumber>         <Name>[value]</Name> -       <PartyType>          <Code>[value]</Code>           <Meaning>[value]</Meaning>        </PartyType>        <LegalEntityInternalID>[value]</LegalEntityInternalID>         <LegalEntityName>[value]</LegalEntityName> -       <Address>          <AddressInternalID>[value]</AddressInternalID>           <AddressLine1>[value]</AddressLine1>           <AddressLine2 />           <AddressLine3 />           <City>[value]</City>           <County />           <State>[value]</State>           <Country>[value]</Country>           <ISO3DigitCountry>[value]</ISO3DigitCountry>           <CountryName>[value]</CountryName>           <PostalCode>[value]</PostalCode>           <PreFormattedConcatenatedAddress>[value]</PreFormattedConcatenatedAddress>           <PreFormattedMailingAddress>[value]</PreFormattedMailingAddress>           <AddressName>[value]</AddressName>       </Address>      <TaxRegistrationNumber />         <LegalRegistrationNumber>[value]</LegalRegistrationNumber>     </PayeeLegalEntity>    <Payer>        <PartyInternalID>[value]</PartyInternalID>         <PartyNumber>[value]</PartyNumber>         <Name>[value]</Name> -       <PartyType>          <Code>[value]</Code>           <Meaning>[value]</Meaning>        </PartyType>

Page 6: Understanding Payments Output Formatting, Extracts and Templates to Bottom

        <TaxRegistrationNumber />         <LegalRegistrationNumber />         <AlternateName />         <CustomerAccountNumber>[value]</CustomerAccountNumber> -       <Address>          <AddressInternalID>[value]</AddressInternalID>           <AddressLine1>[value]</AddressLine1>           <AddressLine2>[value]</AddressLine2>           <AddressLine3 />           <City>[value]</City>           <County />           <State />           <Country>[value]</Country>           <CountryName>[value]</CountryName>           <ISO3DigitCountry>[value]</ISO3DigitCountry>           <PostalCode>[value]</PostalCode>           <AlternateAddressName />       </Address>        <FirstPartyReference>[value]</FirstPartyReference>     </Payer>    <PayerCreditCard>        <CardNumber>[value]</CardNumber>         <MaskedCardNumber>[value]</MaskedCardNumber>         <CardExpiration>[value]</CardExpiration>         <CardIssuer>[value]</CardIssuer> -       <CardHolder>          <HolderName>[value]</HolderName> -         <BillingAddress>             <AddressLine1>[value]</AddressLine1>              <AddressLine2>[value]</AddressLine2>              <City>[value]</City>              <State />              <Country>[value]</Country>              <CountryName>[value]</CountryName>              <ISO3DigitCountry>[value]</ISO3DigitCountry>              <PostalCode>[value]</PostalCode>              <PreFormattedConcatenatedAddress>[value]</PreFormattedConcatenatedAddress>              <PreFormattedMailingAddress>[value]</PreFormattedMailingAddress>              <AddressName />         </BillingAddress>      </CardHolder>    </PayerCreditCard>      [There can be more CC records]-      <CreditCardTransaction>         <ActionType>CAPTURE</ActionType>

Page 7: Understanding Payments Output Formatting, Extracts and Templates to Bottom

         <TransactionDate>[value]</TransactionDate>          <VoiceAuthFlag>[value]</VoiceAuthFlag>     </CreditCardTransaction>    <OriginalCCTransaction>        <ActionType>AUTH</ActionType>         <TransactionDate>[value]</TransactionDate>         <TraceNumber>[value]</TraceNumber>         <AuthCode>[value]</AuthCode>         <VoiceAuthFlag>[value]</VoiceAuthFlag>         <Amount>          <Value>[value]</Value> -         <Currency>            <Code>[value]</Code>         </Currency>      </Amount>    </OriginalCCTransaction>    <PaymentMethod>        <PaymentMethodInternalID>[value]</PaymentMethodInternalID>         <PaymentMethodName>[value]</PaymentMethodName>         <PaymentMethodFormatValue />     </PaymentMethod>    <DocumentReceivable>        <DocumentID>[value]</DocumentID>        <DocumentStatus>          <Code />           <Meaning />        </DocumentStatus>        <DocumentDate>[value]</DocumentDate>         <DocumentCreationDate>[value]</DocumentCreationDate>        <DocumentType>          <Code>[value]</Code>           <Meaning />        </DocumentType>        <DocumentDescription />        <TotalDocumentAmount>          <Value>[value]</Value>            <Currency>              <Code>[value]</Code>            </Currency>        </TotalDocumentAmount>        <PaymentAmount>          <Value>[value]</Value>          <Currency>            <Code>[value]</Code>          </Currency>      </PaymentAmount>

Page 8: Understanding Payments Output Formatting, Extracts and Templates to Bottom

      <Charge>         <Amount>           <Value />            <Currency>               <Code>[value]</Code>            </Currency>         </Amount>        <ChargeType>[value]</ChargeType>       </Charge>       [More charge records may exist] -       <Discount>          <Amount>            <Value>[value]</Value>            <Currency>              <Code>[value]</Code>            </Currency>          </Amount>        </Discount>      [More discount records may exist]        <Tax>          <Amount>            <Value />            <Currency>              <Code>[value]</Code>            </Currency>          </Amount>          <RatePercent />           <TaxType>[value]</TaxType>       </Tax>       [More tax records may exist] -       <ShipmentOrigin>          <AddressLine1 />           <City />           <State />           <Country />           <PostalCode />        </ShipmentOrigin>        [More shipment origin records may exist]       <ShipmentDestination>          <AddressLine1 />

Page 9: Understanding Payments Output Formatting, Extracts and Templates to Bottom

          <City />           <State />           <Country />           <PostalCode />       </ShipmentDestination>       [More shipment destination records may exist] -       <DocumentLine>          <LineID>[value]</LineID>           <LineNumber>[value]</LineNumber> -         <LineType>            <Code>[value]</Code>             <Meaning />          </LineType>          <LineDescription>[value]</LineDescription> -         <LineAmount>            <Value>[value]</Value> -           <Currency>              <Code>[value]</Code>           </Currency>        </LineAmount>          <UnitRate>[value]</UnitRate>           <Quantity>[value]</Quantity>           <UnitOfMeasure>[value]</UnitOfMeasure>           <ProductCode>[value]</ProductCode>           <Tax>-           <Amount>              <Value>[value]</Value> -             <Currency>                <Code>USD</Code>              </Currency>          </Amount>          <RatePercent>[value]</RatePercent>             <TaxType>[value]</TaxType>         </Tax>                    [More tax line records may exist]                  </DocumentLine>                  [More document line records may exist]                </DocumentReceivable>      <DocumentReceivableCount>[value]</DocumentReceivableCount>   </FundsCaptureOrder>

Page 10: Understanding Payments Output Formatting, Extracts and Templates to Bottom

 </PayeeAccount></FundsCaptureInstruction> TemplatesMost formatting templates for iPayment are RTF (rich text format) documents that conform to BI Publisher template syntax (For more information please consult BI Publisher product documentation).The structure of the template is relatively simple to understand by opening it in MS Word or any other RTF text editor. BI Publisher will scan for keywords between <keyword> within a table and lookup the value within the same table. E.g:<TEMPLATE TYPE>  FIXED_POSITION_BASED <CHARACTER SET>  ISO-8859-1 <NEW RECORD CHARACTER>

Carriage Return

Sets general options for the template.There exists a helper application to assist on template design/edit: BI (XML) Publisher Desktop, this application will interact with MS Word, to download click here.The template is arranged in a hierachy of records. Each record mapping to a given level in the Extract XML hierarch. E.g: Open $IBY_TOP/patch/115/publisher/templates/IBY_PTK_B_2_1_en.rtf This is the Paymentech Batch Template It contains the following hierarchy of records:

<LEVEL>  FundsCaptureInstruction <POSITION> <LENGTH> <FORMAT> <PAD> <DATA> <NEW RECORD> FileHeaderRec 1 4 Alpha R, ‘

‘ ‘PID=’

5 6 Alpha R, ‘ ‘

/FundsCaptureInstruction/PayeeAccount/PaymentSystemAccount/AccountOption[Name=’PID’]/Value

FileHeaderRec that maps to level  <FundsCaptureInstruction> in the Extract XML The first field of the record is constant Position 1, length 5, Alphanumeric, Right Padded with spaces, constant value 'PID=' The second field references the Extract XML Position 5, length 6, Alphanumeric, Right Padded with spaces, References the Extract with one condition: Extract path:<FundsCaptureInstruction>  <PayeeAccount>    <PaymentSystemAccount>      <AccountOption> Condition:When account option <name> =’PID’

Page 11: Understanding Payments Output Formatting, Extracts and Templates to Bottom

==> Place the <value> in the field <LEVEL> FundsCaptureOrder <POSITION> <LENGTH> <FORMAT> <PAD> <DATA> <NEW RECORD> FileDetailRec 1 1 Alpha R, ‘

‘ ‘S’

2 10 Alpha L, '0' ../PaymentSystemAccount/AccountOption[Name=’DIV_NUM’]/Value 12 22 Alpha R, ' ' OrderNumber/PayeeOrderNumber

34 2 Alpha L, ' ' IF LENGTH(PayerCreditCard) > 0 THEN IF CreditCardTransaction/ActionType = ‘AUTH’ THEN ‘AU’ ELSIF CreditCardTransaction/ActionType = ‘AUTH_CAPTURE’ THEN ‘DC’ ELSIF CreditCardTransaction/ActionType [...]

FileDetailRec shows a more elaborated conditional field that maps to level <FundsCaptureOrder> in the XML Extract Field #4 uses IF...ELSIF...END IF constructs to output different values in the result based on the values of the <ActionType> tag in the Extract XML  And so each record and it's fields as required by the Payment System/Bank is defined in the template.  Importing a new custom templateWhile changing the iPayment data Extract is a complex customization task, the creation of new templates that format the extract data in a different way to the seeded ones and attaching it for funds capture processing is a relatively simple task.Customizing the iPayment Extract views is not recommended. A change in their definition could affect negatively seeded Payment Systems in use in the installation and as views change when patches are applied it could prove a very complex and costly maintenance task to keep re-applying customizations. As of the time of writing this document the extract views pull a great amount of data related to the funds capture process, as such the need for extra information should be carefully weighted with the costs of maintenance and impact of a customization of the views.The process for creating a new template can start with a blank one or from an existing one. If is desired to start with an existing one:XML Publisher Administrator > Templates Query for Application = Payments Click on the desired template to use as a starting point Click on the download icon RTF template will download With help of the BI (XML) Publisher desktop application (or simply editing it in an RTF capable editor like MS Word) make changes to the template as desired. Rename the template as it will be imported under a different name.It is discouraged to ovewrite seeded templates. The main reason is that as soon as a patch delivering a new version is applied it will overwrite the customization in the database, while creating a new logical template will avoid this event.Once a template is finished the process to register it into EBS and link it to a Payment System is:

Page 12: Understanding Payments Output Formatting, Extracts and Templates to Bottom

Payments Setup Administrator > Formats > XML Publisher Templates Click Go To Task and on the next screen Create Template Name = <Enter a name for the template> Application = Payments Type = RTF (or XSL for Payment Systems like Concord) Code = <Enter a unique code for the template, no spaces> Data Definition = iPayment Funds Capture Instruction Extract 1.0 Type = eText - Outbound (For plain text files)- OR -Type = XSL-XML (For Payment Systems such as Concord that require XML format) Browse for the file Language = English Click Apply Now the new template as to be associated with a new Format:Payments Setup Administrator > Formats > Formats Click Go To Task Select "Funds Capture Settlement Batch" for either Online or Batch Templates Click Create Code = <Enter a unique code name, no spaces> Data Extract = Oracle Payments Funds Capture Settlement Batch Extract, Version 1.0 Name = <Enter a user name for the format> XML Publisher Template = <Select the template created in prior steps> Click Apply Now you can create a new Payment System specifying the formats defined, transmission protocols, and then define a transmission configuration and accounts. For more information please refer to the Payments Documentation.Other Helpful Documents Note 752802.1 Describes Level II & Level III Data and how to get extracts from specific online/batch transactions by ID.Note 265330.1 and Note 452830.1 Describe how to get Debug Logs for iPayment 11i and R12 respectively.Note 364547.1 Has troubleshooting information for Oracle BI (XML) PublisherNote 362496.1 Has instructions to determine the version of Oracle BI (XML) Publisher your EBS instance is running.Note 794542.1 Contains a data gathering script that reports on all DB setups for iPayment with a Payment System as a starting point, inclusing Templates, Template Versions and Formats assigned.Note 748309.1 Guides on how to customize the file name for the Local File System delivery transmission protocol. Note on customizationsWhile this document provides guidance for the creation of customizations, Oracle Global Customer Support (GCS) does not support customizations. However GCS supports the tools and the vanilla portions of the application. As such BI (XML)

Page 13: Understanding Payments Output Formatting, Extracts and Templates to Bottom

Publisher output generation is supported provided the template is well constructed and the expected data exists in the extract. The iPayment extract is supported if not providing the expected data however the sample data depicted in this document does not state a commitment from Oracle Payments Development to continue to be the same neither that desired data will be included upon request. The iPayment engine and setups screens are supported by the Global iPayment Support team.In General the Global iPayment Support Team will request a vanilla setup with known to work templates to be done at your instance in order to determine if the source of failure is the vanilla product or the customizations. The Global iPayment Support Team will not support an installation using customized extract views unless the failure is proven to exist with the vanilla views [ID 799597.1]

Modified:Feb 2, 2012 Type:WHITE PAPERStatus:PUBLISHED Priority:3

Comments (0)

In this Document  Abstract  Document History  R12/11i2: Understanding Payments Output Formatting, Extracts and Templates     Extracts and Templates     Extracts     Templates     Importing a new custom template     Other Helpful Documents        Note on customizations     Community Discussions

Applies to: Oracle Payments - Version: 11.5.10.2 to 12.1.3 - Release: 11.5 to 12.1Information in this document applies to any platform.AbstractiPayment (Payments Funds Capture Portion) is an engine that translates EBS data into 3rd Party Payment Systems (and Banks) data formats. Additionally it handles transmission and several other tasks.This document concentrates in the data formatting portion. Before 11i IBY.Q patchset data formatting was handled by specialized Java classes that step-by-step crafted the expected output for a given Payment System or Bank.While this approach is still supported by the product (E.g: Paypal Servlet is a 3rd party servlet that uses this old approach) from IBY.Q onwards iPayment leveraged BI Publisher (Formerly known as XML Publisher) as the centralized formatting engine eliminating the dependency on specialized classes and improving maintainability and supportability of the product.Document History

Page 14: Understanding Payments Output Formatting, Extracts and Templates to Bottom

Author : The Oracle iPayment Global Support TeamCreate Date 02-APR-2009 Update Date 02-APR-2009 R12/11i2: Understanding Payments Output Formatting, Extracts and TemplatesExtracts and TemplatesTwo key concepts in the way iPayment formats data as per the requirements of 3rd Party Payment Systems or Banks are Extracts and Templates. Extracts and Templates work similarly to "mail merge" features of word processors. Data is on one side, templates on another, the merge process results in several documents with dynamic fields replaced in the template. In iPayment case the result is a single document with one or several entity records.BI Publisher (XDO) uses the same concept, Templates follow the same purpose and Extracts are the datasource in XML format. For iPayment interface with XDO the result is an e-Text document (plain text) as most of the Payment Systems and Banks require.Extract + Template = Formatted E-Text or XML OutputExtractsEvery time there is an online transaction or a batch transaction iPayment queries the extract for the same. The extract is an XML document produced by a complex hierarchy of database views that leverage the XML features of Oracle Server, the view output is a fully formatted XML document.For online transactions (Credit Card/Purchase Card Authorizations) the Extract contains information for a single entity, whereas for batch transactions (Batch Close, EFT Acct Xfer) the Extract contains information for as many entities (funds capture instructions) as there are in the batch.Extracts are gathered in package IBY_FNDCPT_EXTRACT_GEN_PVT (ibyfcxgb.pls) procedure Create_Extract_1_0Extract information (the first megabyte) was available in IBY Debug Log files up to BatchEFTPayment.class version 120.41.12000000.7, on higher versions extract information is no longer logged, however it can be obtained from the database as described in Note:752802.1The top level extract views are:IBY_XML_BATCH_FCI_1_0_V: For batch extracts IBY_XML_ONLINE_FCI_1_0_V: For online extracts The view dependency hierarchy can be scanned with the following helper script (it will not drill down other product views):create or replaceprocedure oss_iby_diag_explode_ev(pLevel number, pMv varchar2) is  cursor mvDepend is    select referenced_name, referenced_type      from dba_dependencies     where name = pMv      order by decode(referenced_type, 'TABLE', 1, 2);begin  if pLevel = 0 then    dbms_output.put_line('. Dependencies and rows for: '||pMv);  end if;

Page 15: Understanding Payments Output Formatting, Extracts and Templates to Bottom

  for i in mvDepend loop    if i.referenced_type = 'VIEW' and i.referenced_name like 'IBY%' then      dbms_output.put_line('.'||lpad('+-',pLevel+2)||'>'||i.referenced_name||                           ' (VIEW)');      oss_iby_diag_explode_ev(pLevel + 2,i.referenced_name);    else      dbms_output.put_line('.'||lpad('+-',pLevel+2)||'>'||i.referenced_name||                           ' ('||i.referenced_type||')');    end if;  end loop;end;/     SQL>set serveroutput on size 1000000    SQL>exec oss_iby_diag_explode_ev(0,'IBY_XML_BATCH_FCI_1_0_V');It will show the current hierarchy of dependencies for the top level view, e.g:. Dependencies and rows for: IBY_XML_BATCH_FCI_1_0_V.+->AGGXMLIMP (TYPE).+->IBY_TRXN_SUMMARIES_ALL (SYNONYM).+->XMLAGG (SYNONYM).+->XMLCONCAT (NON-EXISTENT).+->IBY_XML_FC_PRBA_1_0_V (VIEW).  +->XMLTYPE (TYPE).  +->XMLCONCAT (NON-EXISTENT).  +->IBY_EXT_FD_PRBA_1_0_V (VIEW).    +->IBY_FD_EXTRACT_GEN_PVT (PACKAGE).    +->CE_BANK_BRANCHES_V (VIEW).    +->IBY_UTILITY_PVT (PACKAGE)[...]The Extract views produce when queried (See Note:752802.1) an XML document containing all details for the Auth Request or all details for each line in a Batch.As Payment System requirements change, Extracts views change as well (if needed). At the time of writing this document Extract hierarchy for Batch isBatch Extract Sample- <FundsCaptureInstruction>- <InstructionInfo>    <InstructionInternalID>[value]</InstructionInternalID>     <InstructionName>[value]</InstructionName>     <InstructionCreationDate>[value]</InstructionCreationDate>     <InstructionSentDate>[value]</InstructionSentDate> -   <InstructionStatus>      <Code>[value]</Code>       <Meaning />       </InstructionStatus></InstructionInfo>- <InstructionSequence>

Page 16: Understanding Payments Output Formatting, Extracts and Templates to Bottom

    <SequenceName>[value]</SequenceName>     <LastValue>[value]</LastValue>  </InstructionSequence>- <InstructionTotals>    <PayeeAccountCount>[value]</PayeeAccountCount> -   <SettlementTotal>      <Value>[value]</Value> -     <Currency>        <Code />       </Currency>   </SettlementTotal></InstructionTotals>  <InstructionGrouping /> - <PayeeAccount>-   <PaymentSystemAccount>      <AccountName>[value]</AccountName> -     <AccountOption>        <Name>[value]</Name>         <Value>[value]</Value>      </AccountOption>       [several account options] -   </PaymentSystemAccount>-   <Payee>      <Name>[value]</Name>   </Payee>    <OrderCount>[value]</OrderCount> -   <AccountTotals>-     <AuthorizationsTotal>        <Value>[value]</Value> -       <Currency>          <Code>[value]</Code>        </Currency>    </AuthorizationsTotal>-     <CapturesTotal>        <Value>[value]</Value> -       <Currency>          <Code>[value]</Code>        </Currency>      </CapturesTotal>-     <CreditsTotal>        <Value>[value]</Value> -       <Currency>          <Code>[value]</Code>        </Currency>

Page 17: Understanding Payments Output Formatting, Extracts and Templates to Bottom

      </CreditsTotal>    </AccountTotals>-   <FundsCaptureOrder>-     <OrderSourceInfo>        <ApplicationInternalID>[value]</ApplicationInternalID>         <ApplicationName>[value]</ApplicationName>      </OrderSourceInfo>-     <OrderNumber>        <PayeeOrderNumber>[value]</PayeeOrderNumber>      </OrderNumber>      <PayeeBankAccount /> -     <OrderAmount>        <Value>[value]</Value> -       <Currency>          <Code>[value]</Code>        </Currency>      </OrderAmount>-     <PayeeLegalEntity>        <PartyInternalID>[value]</PartyInternalID>         <PartyNumber>[value]</PartyNumber>         <Name>[value]</Name> -       <PartyType>          <Code>[value]</Code>           <Meaning>[value]</Meaning>        </PartyType>        <LegalEntityInternalID>[value]</LegalEntityInternalID>         <LegalEntityName>[value]</LegalEntityName> -       <Address>          <AddressInternalID>[value]</AddressInternalID>           <AddressLine1>[value]</AddressLine1>           <AddressLine2 />           <AddressLine3 />           <City>[value]</City>           <County />           <State>[value]</State>           <Country>[value]</Country>           <ISO3DigitCountry>[value]</ISO3DigitCountry>           <CountryName>[value]</CountryName>           <PostalCode>[value]</PostalCode>           <PreFormattedConcatenatedAddress>[value]</PreFormattedConcatenatedAddress>           <PreFormattedMailingAddress>[value]</PreFormattedMailingAddress>           <AddressName>[value]</AddressName>       </Address>      <TaxRegistrationNumber />         <LegalRegistrationNumber>[value]</LegalRegistrationNumber>

Page 18: Understanding Payments Output Formatting, Extracts and Templates to Bottom

    </PayeeLegalEntity>    <Payer>        <PartyInternalID>[value]</PartyInternalID>         <PartyNumber>[value]</PartyNumber>         <Name>[value]</Name> -       <PartyType>          <Code>[value]</Code>           <Meaning>[value]</Meaning>        </PartyType>        <TaxRegistrationNumber />         <LegalRegistrationNumber />         <AlternateName />         <CustomerAccountNumber>[value]</CustomerAccountNumber> -       <Address>          <AddressInternalID>[value]</AddressInternalID>           <AddressLine1>[value]</AddressLine1>           <AddressLine2>[value]</AddressLine2>           <AddressLine3 />           <City>[value]</City>           <County />           <State />           <Country>[value]</Country>           <CountryName>[value]</CountryName>           <ISO3DigitCountry>[value]</ISO3DigitCountry>           <PostalCode>[value]</PostalCode>           <AlternateAddressName />       </Address>        <FirstPartyReference>[value]</FirstPartyReference>     </Payer>    <PayerCreditCard>        <CardNumber>[value]</CardNumber>         <MaskedCardNumber>[value]</MaskedCardNumber>         <CardExpiration>[value]</CardExpiration>         <CardIssuer>[value]</CardIssuer> -       <CardHolder>          <HolderName>[value]</HolderName> -         <BillingAddress>             <AddressLine1>[value]</AddressLine1>              <AddressLine2>[value]</AddressLine2>              <City>[value]</City>              <State />              <Country>[value]</Country>              <CountryName>[value]</CountryName>              <ISO3DigitCountry>[value]</ISO3DigitCountry>              <PostalCode>[value]</PostalCode>

Page 19: Understanding Payments Output Formatting, Extracts and Templates to Bottom

             <PreFormattedConcatenatedAddress>[value]</PreFormattedConcatenatedAddress>              <PreFormattedMailingAddress>[value]</PreFormattedMailingAddress>              <AddressName />         </BillingAddress>      </CardHolder>    </PayerCreditCard>      [There can be more CC records]-      <CreditCardTransaction>         <ActionType>CAPTURE</ActionType>          <TransactionDate>[value]</TransactionDate>          <VoiceAuthFlag>[value]</VoiceAuthFlag>     </CreditCardTransaction>    <OriginalCCTransaction>        <ActionType>AUTH</ActionType>         <TransactionDate>[value]</TransactionDate>         <TraceNumber>[value]</TraceNumber>         <AuthCode>[value]</AuthCode>         <VoiceAuthFlag>[value]</VoiceAuthFlag>         <Amount>          <Value>[value]</Value> -         <Currency>            <Code>[value]</Code>         </Currency>      </Amount>    </OriginalCCTransaction>    <PaymentMethod>        <PaymentMethodInternalID>[value]</PaymentMethodInternalID>         <PaymentMethodName>[value]</PaymentMethodName>         <PaymentMethodFormatValue />     </PaymentMethod>    <DocumentReceivable>        <DocumentID>[value]</DocumentID>        <DocumentStatus>          <Code />           <Meaning />        </DocumentStatus>        <DocumentDate>[value]</DocumentDate>         <DocumentCreationDate>[value]</DocumentCreationDate>        <DocumentType>          <Code>[value]</Code>           <Meaning />        </DocumentType>        <DocumentDescription />        <TotalDocumentAmount>          <Value>[value]</Value>

Page 20: Understanding Payments Output Formatting, Extracts and Templates to Bottom

            <Currency>              <Code>[value]</Code>            </Currency>        </TotalDocumentAmount>        <PaymentAmount>          <Value>[value]</Value>          <Currency>            <Code>[value]</Code>          </Currency>      </PaymentAmount>      <Charge>         <Amount>           <Value />            <Currency>               <Code>[value]</Code>            </Currency>         </Amount>        <ChargeType>[value]</ChargeType>       </Charge>       [More charge records may exist] -       <Discount>          <Amount>            <Value>[value]</Value>            <Currency>              <Code>[value]</Code>            </Currency>          </Amount>        </Discount>      [More discount records may exist]        <Tax>          <Amount>            <Value />            <Currency>              <Code>[value]</Code>            </Currency>          </Amount>          <RatePercent />           <TaxType>[value]</TaxType>       </Tax>       [More tax records may exist] -       <ShipmentOrigin>          <AddressLine1 />

Page 21: Understanding Payments Output Formatting, Extracts and Templates to Bottom

          <City />           <State />           <Country />           <PostalCode />        </ShipmentOrigin>        [More shipment origin records may exist]       <ShipmentDestination>          <AddressLine1 />           <City />           <State />           <Country />           <PostalCode />       </ShipmentDestination>       [More shipment destination records may exist] -       <DocumentLine>          <LineID>[value]</LineID>           <LineNumber>[value]</LineNumber> -         <LineType>            <Code>[value]</Code>             <Meaning />          </LineType>          <LineDescription>[value]</LineDescription> -         <LineAmount>            <Value>[value]</Value> -           <Currency>              <Code>[value]</Code>           </Currency>        </LineAmount>          <UnitRate>[value]</UnitRate>           <Quantity>[value]</Quantity>           <UnitOfMeasure>[value]</UnitOfMeasure>           <ProductCode>[value]</ProductCode>           <Tax>-           <Amount>              <Value>[value]</Value> -             <Currency>                <Code>USD</Code>              </Currency>          </Amount>          <RatePercent>[value]</RatePercent>             <TaxType>[value]</TaxType>         </Tax>

Page 22: Understanding Payments Output Formatting, Extracts and Templates to Bottom

                    [More tax line records may exist]                  </DocumentLine>                  [More document line records may exist]                </DocumentReceivable>      <DocumentReceivableCount>[value]</DocumentReceivableCount>   </FundsCaptureOrder> </PayeeAccount></FundsCaptureInstruction> TemplatesMost formatting templates for iPayment are RTF (rich text format) documents that conform to BI Publisher template syntax (For more information please consult BI Publisher product documentation).The structure of the template is relatively simple to understand by opening it in MS Word or any other RTF text editor. BI Publisher will scan for keywords between <keyword> within a table and lookup the value within the same table. E.g:<TEMPLATE TYPE>  FIXED_POSITION_BASED <CHARACTER SET>  ISO-8859-1 <NEW RECORD CHARACTER>

Carriage Return

Sets general options for the template.There exists a helper application to assist on template design/edit: BI (XML) Publisher Desktop, this application will interact with MS Word, to download click here.The template is arranged in a hierachy of records. Each record mapping to a given level in the Extract XML hierarch. E.g: Open $IBY_TOP/patch/115/publisher/templates/IBY_PTK_B_2_1_en.rtf This is the Paymentech Batch Template It contains the following hierarchy of records: <LEVEL>  FundsCaptureInstruction <POSITION>

<LENGTH>

<FORMAT>

<PAD>

<DATA> <COMMENTS>

<NEW RECORD>

FileHeaderRec

1 4 Alpha

R, ‘ ‘

‘PID=’ Presenter’s ID (PID)

5 6 Alpha

R, ‘ ‘

/FundsCaptureInstruction/PayeeAccount/PaymentSystemAccount/AccountOption[Name=’PID’]/Value

Presenter’s ID (PID)

Page 23: Understanding Payments Output Formatting, Extracts and Templates to Bottom

FileHeaderRec that maps to level  <FundsCaptureInstruction> in the Extract XML The first field of the record is constant Position 1, length 5, Alphanumeric, Right Padded with spaces, constant value 'PID=' The second field references the Extract XML Position 5, length 6, Alphanumeric, Right Padded with spaces, References the Extract with one condition: Extract path:<FundsCaptureInstruction>  <PayeeAccount>    <PaymentSystemAccount>      <AccountOption> Condition:When account option <name> =’PID’==> Place the <value> in the field <LEVEL> FundsCaptureOrder

<POSITION>

<LENGTH>

<FORMAT>

<PAD>

<DATA> <COMMENTS>

<NEW RECORD>

FileDetailRec

1 1 Alpha R, ‘ ‘

‘S’ Record type code

2 10 Alpha L, '0'

../PaymentSystemAccount/AccountOption[Name=’DIV_NUM’]/Value

Division number

12 22 Alpha R, ' '

OrderNumber/PayeeOrderNumber Merchant’s Order Number (Tangible Id)

Page 24: Understanding Payments Output Formatting, Extracts and Templates to Bottom

34 2 Alpha L, ' '

IF LENGTH(PayerCreditCard) > 0 THEN IF CreditCardTransaction/ActionType = ‘AUTH’ THEN ‘AU’ ELSIF CreditCardTransaction/ActionType = ‘AUTH_CAPTURE’ THEN ‘DC’ ELSIF CreditCardTransaction/ActionType [...]

Action Code AU = Authorization DC = Conditional Deposit DP = Deposit RF = Refund[...] 

FileDetailRec shows a more elaborated conditional field that maps to level <FundsCaptureOrder> in the XML Extract Field #4 uses IF...ELSIF...END IF constructs to output different values in the result based on the values of the <ActionType> tag in the Extract XML  And so each record and it's fields as required by the Payment System/Bank is defined in the template.  Importing a new custom templateWhile changing the iPayment data Extract is a complex customization task, the creation of new templates that format the extract data in a different way to the seeded ones and attaching it for funds capture processing is a relatively simple task.Customizing the iPayment Extract views is not recommended. A change in their definition could affect negatively seeded Payment Systems in use in the installation and as views change when patches are applied it could prove a very complex and costly maintenance task to keep re-applying customizations. As of the time of writing this document the extract views pull a great amount of data related to the funds capture process, as such the need for extra information should be carefully weighted with the costs of maintenance and impact of a customization of the views.The process for creating a new template can start with a blank one or from an existing one. If is desired to start with an existing one:XML Publisher Administrator > Templates Query for Application = Payments Click on the desired template to use as a starting point Click on the download icon RTF template will download With help of the BI (XML) Publisher desktop application (or simply editing it in an RTF capable editor like MS Word) make changes to the template as desired. Rename the template as it will be imported under a different name.It is discouraged to ovewrite seeded templates. The main reason is that as soon as a patch delivering a new version is applied it will overwrite the customization in the database, while creating a new logical template will avoid this event.

Page 25: Understanding Payments Output Formatting, Extracts and Templates to Bottom

Once a template is finished the process to register it into EBS and link it to a Payment System is:Payments Setup Administrator > Formats > XML Publisher Templates Click Go To Task and on the next screen Create Template Name = <Enter a name for the template> Application = Payments Type = RTF (or XSL for Payment Systems like Concord) Code = <Enter a unique code for the template, no spaces> Data Definition = iPayment Funds Capture Instruction Extract 1.0 Type = eText - Outbound (For plain text files)- OR -Type = XSL-XML (For Payment Systems such as Concord that require XML format) Browse for the file Language = English Click Apply Now the new template as to be associated with a new Format:Payments Setup Administrator > Formats > Formats Click Go To Task Select "Funds Capture Settlement Batch" for either Online or Batch Templates Click Create Code = <Enter a unique code name, no spaces> Data Extract = Oracle Payments Funds Capture Settlement Batch Extract, Version 1.0 Name = <Enter a user name for the format> XML Publisher Template = <Select the template created in prior steps> Click Apply Now you can create a new Payment System specifying the formats defined, transmission protocols, and then define a transmission configuration and accounts. For more information please refer to the Payments Documentation.Other Helpful Documents Note 752802.1 Describes Level II & Level III Data and how to get extracts from specific online/batch transactions by ID.Note 265330.1 and Note 452830.1 Describe how to get Debug Logs for iPayment 11i and R12 respectively.Note 364547.1 Has troubleshooting information for Oracle BI (XML) PublisherNote 362496.1 Has instructions to determine the version of Oracle BI (XML) Publisher your EBS instance is running.Note 794542.1 Contains a data gathering script that reports on all DB setups for iPayment with a Payment System as a starting point, inclusing Templates, Template Versions and Formats assigned.Note 748309.1 Guides on how to customize the file name for the Local File System delivery transmission protocol. Note on customizationsWhile this document provides guidance for the creation of customizations, Oracle Global Customer Support (GCS) does not support customizations. However GCS supports the tools and the vanilla portions of the application. As such BI (XML) Publisher output

Page 26: Understanding Payments Output Formatting, Extracts and Templates to Bottom

generation is supported provided the template is well constructed and the expected data exists in the extract. The iPayment extract is supported if not providing the expected data however the sample data depicted in this document does not state a commitment from Oracle Payments Development to continue to be the same neither that desired data will be included upon request. The iPayment engine and setups screens are supported by the Global iPayment Support team.In General the Global iPayment Support Team will request a vanilla setup with known to work templates to be done at your instance in order to determine if the source of failure is the vanilla product or the customizations. The Global iPayment Support Team will not support an installation using customized extract views unless the failure is proven to exist with the vanilla views