<converters>
  <converter key="BarcodeConverter"/>
  <converter key="CaptureModeConverter"/>
  <converter key="CardholderVerificationMethodConverter"/>
  <converter key="DrawRectConverter"/>
  <converter key="DuplicateReceiptHeaderConverter"/>
  <converter key="ImageConverter"/>
  <converter key="ReceiptTypeHeaderConverter"/>
  <converter key="TransactionOutcomeConverter"/>
  <converter key="TransactionTypeConverter"/>
  <converter key="ReceiptTypeRetentionConverter"/>
  <converter key="TextGlobalizationConverter"/>
</converters>

<styles target="paragraph">
  <style key="StartCondensedTextStyle">
  </style>

  <style key="CondensedTextStyle">
  </style>

  <style key="EndCondensedTextStyle">
  </style>

  <style key="StandardTextStyle">
  </style>

  <style key="HeadingTextStyle">
      <setter property="font_size" value="medium"/>
      <setter property="style" value="bold"/>
  </style>

  <style key="CardAcceptorNameTextStyle">
      <setter property="font_size" value="medium"/>
      <setter property="style" value="bold"/>
  </style>

  <style key="RefundTextStyle">
      <setter property="font_size" value="small"/>
      <setter property="style" value="bold"/>
  </style>

  <style key="PaymentAmountTotalTextStyle">
      <setter property="font_size" value="medium"/>
      <setter property="style" value="bold"/>
  </style>

  <style key="TransactionOutcomeTextStyle">
      <setter property="font_size" value="medium"/>
      <setter property="style" value="bold"/>
  </style>
</styles>


<template>
    
  <section name="CardAcceptorDetails">
    <conditional_section name="CardAcceptorLogo">
      <paragraph>
        <image alignment="center" converter="ImageConverter">
          <argument name="data">${CARD_ACCEPTOR_LOGO_DATA}</argument>
          <argument name="file_name">${CARD_ACCEPTOR_LOGO_FILE_NAME}</argument>
          <argument name="width">${CARD_ACCEPTOR_LOGO_WIDTH}</argument>
        </image>
    </paragraph>
    </conditional_section>
    <!--<conditional_section name="CardAcceptorName">
      <paragraph style="CardAcceptorNameTextStyle">
        <text>${CARD_ACCEPTOR_NAME}</text>
      </paragraph>
    </conditional_section>-->

    <conditional_section name="CardAcceptorStoreName">
      <paragraph style="CardAcceptorNameTextStyle">
        <text>${CARD_ACCEPTOR_STORE_NAME}</text>
      </paragraph>
    </conditional_section>
    <conditional_section name="CardAcceptorAddress1">
      <paragraph style="CondensedTextStyle">
        <text>${CARD_ACCEPTOR_ADDRESS1}</text>
      </paragraph>
    </conditional_section>
    <!--<conditional_section name="CardAcceptorAddress2">
      <paragraph style="CondensedTextStyle">
        <text>${CARD_ACCEPTOR_ADDRESS2}</text>
      </paragraph>
    </conditional_section>
    <conditional_section name="CardAcceptorAddress3">
      <paragraph style="CondensedTextStyle">
        <text>${CARD_ACCEPTOR_ADDRESS3}</text>
      </paragraph>
    </conditional_section>-->
    <conditional_section name="CardAcceptorTownCity">
      <paragraph style="CondensedTextStyle">
        <text>${CARD_ACCEPTOR_TOWN_CITY}</text>
      </paragraph>
    </conditional_section>
     
    <paragraph style="CondensedTextStyle">
      <conditional_section name="CardAcceptorCountyState"> 
        <text>${CARD_ACCEPTOR_COUNTY_STATE}</text>
      </conditional_section>
      <conditional_section name="CardAcceptorZipCode">
        <text>${CARD_ACCEPTOR_ZIP_CODE}</text>
      </conditional_section>
    </paragraph>
      
    <!--<conditional_section name="CardAcceptorCountryName">
      <paragraph style="EndCondensedTextStyle">
        <text>${CARD_ACCEPTOR_COUNTRY_NAME}</text>
      </paragraph>
    </conditional_section>-->

    <newline/>
    </section>
    
   <section name="TimestampDetails">
     <paragraph style="StandardTextStyle" alignment="left"> 
      <conditional_section name="TimestampDateOfPayment">
        <text>${DATE_OF_PAYMENT}</text>
      </conditional_section>
      <conditional_section name="TimestampTimeOfPayment">
        <text>${TIME_OF_PAYMENT}</text>
      </conditional_section>
     </paragraph>
   </section>
    
   <conditional_section name="CardAcceptorReference">
      <paragraph style="CondensedTextStyle">
        <field>
         <label>REF</label>
         <value>${CARD_ACCEPTOR_REFERENCE}</value>
        </field>
      </paragraph>
    </conditional_section>

    <conditional_section name="CardAcceptorReceiptNumber">
      <paragraph style="CondensedTextStyle">
        <field>
          <label>PID</label>
          <value>${CARD_ACCEPTOR_RECEIPT_NUMBER}</value>
       </field>
      </paragraph>
    </conditional_section>
   
    <!--<conditional_section name="AcquirerMessageNumber">
      <paragraph style="EndCondensedTextStyle">
        <field>
         <label>MSG NO</label>
         <value>${ACQUIRER_MESSAGE_NUMBER}</value>
        </field>
      </paragraph>
    </conditional_section>-->

  <section name="Acquirer">
    <conditional_section name="AcquirerCardAcceptorNumber">
      <paragraph style="StandardTextStyle">
        <field alignment="left">
          <label>MID</label>
          <value>${CARD_ACCEPTOR_NUMBER}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="AcquirerTerminalId">
      <paragraph style="StandardTextStyle">
      <field alignment="left">
        <label>TID</label>
        <value>${TERMINAL_IDENTIFIER}</value>
      </field>
    </paragraph>
    </conditional_section>
  </section>

  <section name="CardDetails">
      
   <conditional_section name="CardDetailsApplicationIdentifier">
     <paragraph style="StandardTextStyle">
      <field alignment="left">
        <label>AID</label>
        <value>${APPLICATION_IDENTIFIER}</value>
      </field>
     </paragraph>
    </conditional_section>   
   
  
  <conditional_section name="CardDetailsApplicationExpirationDate">
    <paragraph style="StandardTextStyle">
    <field alignment="left">
      <label converter="TextGlobalizationConverter">
        <argument name="text">APPLICATIONEXPIRATIONDATE</argument>
      </label>
      <value>${APPLICATION_EXPIRATION_DATE}</value>
    </field>
   </paragraph>
  </conditional_section>
  <conditional_section name="CardDetailsExpiryDate">
   <paragraph style="StandardTextStyle">
    <field alignment="left">
      <label converter="TextGlobalizationConverter">
        <argument name="text">EXPIRYDATE</argument>
      </label>
      <value>${EXPIRY_DATE}</value>
    </field> 
    </paragraph>
  </conditional_section>
   
    
  <conditional_section name="CardDetailsApplicationEffectiveDate">
  <paragraph style="StandardTextStyle">
    <field alignment="left">
      <label converter="TextGlobalizationConverter">
        <argument name="text">APPLICATIONEFFECTIVEDATE</argument>
      </label>
      <value>${APPLICATION_EFFECTIVE_DATE}</value>
    </field>
     </paragraph>
  </conditional_section>
  <conditional_section name="CardDetailsStartDate">
  <paragraph style="StandardTextStyle">
    <field alignment="right">
      <label converter="TextGlobalizationConverter">
        <argument name="text">STARTDATE</argument>
      </label>
      <value>${START_DATE}</value>
    </field>
   </paragraph>
  </conditional_section>
  

    <paragraph style="StandardTextStyle">
      <conditional_section name="CardDetailsApplicationPrimaryAccountNumberSequenceNumber">
        <field alignment="left">
          <label converter="TextGlobalizationConverter">
            <argument name="text">APPLICATIONPRIMARYACCOUNTNUMBERSEQUENCENUMBER</argument>
          </label>
          <value>${APPLICATION_PRIMARY_ACCOUNT_NUMBER_SEQUENCE_NUMBER}</value>
        </field>
      </conditional_section>
     <conditional_section name="PaymentTransactionSource">
      <text converter="CaptureModeConverter" alignment="right">
        <argument name="capture_mode">${TRANSACTION_SOURCE}</argument>
        <argument name="cardholder_engagement_method">${CARDHOLDER_ENGAGEMENT_METHOD}</argument>
      </text>
     </conditional_section>
        
     <conditional_section name="CardDetailsCardIssueNumber">
      <field alignment="left">
        <label converter="TextGlobalizationConverter">
          <argument name="text">ISSUENUMBER</argument>
        </label>
          <value>${ISSUE_NUMBER}</value>
        </field>
     </conditional_section>
     <newline/>
    </paragraph>
      
    <conditional_section name="CardDetailsApplicationLabel">
      <paragraph style="StandardTextStyle">
        <text>${APPLICATION_LABEL}</text>
      </paragraph>
    </conditional_section>
      
    <conditional_section name="CardDetailsPrimaryAccountNumber">
      <paragraph style="EndCondensedTextStyle">
          <text>${PRIMARY_ACCOUNT_NUMBER}</text>
      </paragraph>
    </conditional_section>
      
    <conditional_section name="CardDetailsApplicationPreferredName">
      <paragraph style="StandardTextStyle">
        <text>${APPLICATION_PREFERRED_NAME}</text>
         <newline/>
      </paragraph>
    </conditional_section>
      
    <conditional_section name="CardDetailsCardSchemeName">
      <paragraph style="StandardTextStyle">
        <text>${CARD_SCHEME_NAME}</text>
      </paragraph>
    </conditional_section>
  
  </section>

  <section name="PaymentTransactionType">
    <conditional_section name="TransactionType1">
      <newline/>
      <paragraph style="RefundTextStyle">
        <text converter="TransactionTypeConverter">
          <argument name="transaction_type">${TRANSACTION_TYPE}</argument>
        </text>
      </paragraph>
    </conditional_section>

    <conditional_section name="TransactionType0,2,3,4,5,6">
      <paragraph style="StandardTextStyle">
        <text converter="TransactionTypeConverter">
          <argument name="transaction_type">${TRANSACTION_TYPE}</argument>
        </text>
      </paragraph>
    </conditional_section>
  </section>

  <section name="AmountDetails">
    <conditional_section name="PaymentCardAcceptorPaymentAmount">
      <paragraph style="StartCondensedTextStyle">
        <field>
          <label alignment="left" converter="TextGlobalizationConverter">
            <argument name="text">AMOUNT</argument>
          </label>
          <value alignment="right">${CARD_ACCEPTOR_PAYMENT_AMOUNT}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="PaymentCardAcceptorSurchargeAmount">
      <paragraph style="CondensedTextStyle">
        <field>
          <label alignment="left" converter="TextGlobalizationConverter">
            <argument name="text">SURCHARGE</argument>
          </label>
          <value alignment="right">${CARD_ACCEPTOR_SURCHARGE_AMOUNT}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="PaymentCardAcceptorGratuityAmount">
      <paragraph style="CondensedTextStyle">
        <field>
          <label alignment="left" converter="TextGlobalizationConverter">
            <argument name="text">GRATUITY</argument>
          </label>
          <value alignment="right">${CARD_ACCEPTOR_GRATUITY_AMOUNT}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="PaymentCardAcceptorCashbackAmount">
      <paragraph style="CondensedTextStyle">
        <field>
          <label alignment="left" converter="TextGlobalizationConverter">
            <argument name="text">CASHBACK</argument>
          </label>
          <value alignment="right">${CARD_ACCEPTOR_CASHBACK_AMOUNT}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="CharityCardAcceptorCharitableDonationAmount">
      <paragraph style="CondensedTextStyle">
        <field>
          <label alignment="left" converter="TextGlobalizationConverter">
            <argument name="text">CHARITYDONATION</argument>
          </label>
          <value alignment="right">${CHARITABLE_DONATION_AMOUNT}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="PaymentCardAcceptorTotalAmount">
      <paragraph style="PaymentAmountTotalTextStyle">
        <field>
          <label alignment="left" converter="TextGlobalizationConverter">
            <argument name="text">TOTAL</argument>
          </label>
          <value alignment="right">${CARD_ACCEPTOR_TOTAL_AMOUNT}</value>
        </field>
      </paragraph>
    </conditional_section>
  </section>
  <section name="CardholderInterfaceDetails">
    <conditional_section name="PaymentSchemeData">
        <paragraph style="StandardTextStyle">
          <text>${PAYMENT_SCHEME_DATA}</text>
        </paragraph>
    </conditional_section>
    <conditional_section name="PaymentSchemeDataLogo">
      <paragraph style="StandardTextStyle">
        <image alignment="center" converter="ImageConverter">
          <argument name="data">${PAYMENT_SCHEME_DATA_LOGO_DATA}</argument>
          <argument name="file_name">${PAYMENT_SCHEME_DATA_LOGO_FILE_NAME}</argument>
          <argument name="width">${PAYMENT_SCHEME_DATA_LOGO_WIDTH}</argument>
        </image>
      </paragraph>
    </conditional_section>

  </section>
    
  <section name="OutcomeTransactionOutcome">
    <conditional_section name="OutcomeTransactionOutcome">
      <paragraph style="TransactionOutcomeTextStyle" alignment="center">
        <text converter="TransactionOutcomeConverter">
          <argument name="transaction_outcome">${TRANSACTION_OUTCOME}</argument>
        </text>
      </paragraph>
    </conditional_section>
    <conditional_section name="TransactionOutcome1AndCVM">
      <paragraph style="OutcomeTransactionOutcome" alignment="center">
        <text converter="CardholderVerificationMethodConverter">
          <argument name="cvm">${CARDHOLDER_VERIFICATION_METHOD}</argument>
          <argument name="receipt_type">${RECEIPT_TYPE}</argument>
        </text>
      </paragraph>
    </conditional_section>
      <conditional_section name="AOSA">
      <paragraph style="StandardTextStyle" alignment="center">
        <field>
          <label converter="TextGlobalizationConverter">
            <argument name="text">AOSA</argument>
          </label>
          <value>${AOSA}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="TransactionOutcome1AndSignatureBlock">
      <paragraph>
       <newline/><newline/>
        <image alignment="center" converter="DrawRectConverter">
          <argument name="width">${SIGNATURE_BLOCK_WIDTH}</argument>
          <argument name="height">${SIGNATURE_BLOCK_LINE_HEIGHT}</argument>
        </image>
      </paragraph>
    </conditional_section>
    <conditional_section name="DeclarationMessage">
      <paragraph style="StandardTextStyle" alignment="center">
        <text>${DECLARATION_MESSAGE}</text>
      </paragraph>
    </conditional_section>
  </section>
  
  <!--authorization code-->
  <conditional_section name="OutcomeTextMessage">
    <section name="TransactionResponse">
      <paragraph style="StandardTextStyle" alignment="center">
        <text>${OUTCOME_TEXT_MESSAGE}</text>
      </paragraph>
    </section>
  </conditional_section>

  <conditional_section name="CharityReceiptText">
    <section>
      <paragraph style="StandardTextStyle">
        <text>${CHARITY_RECEIPT_TEXT}</text>
      </paragraph>
    </section>
  </conditional_section>

  <section name="TokenDetails">
    <conditional_section name="CardDetailsToken">
        <paragraph style="StandardTextStyle">
          <text>TKN</text>
          <image alignment="center" converter="BarcodeConverter">
            <argument name="type">${TOKEN_TYPE}</argument>
            <argument name="data">${TOKEN_DATA}</argument>
            <argument name="width">${TOKEN_WIDTH}</argument>
          </image>
        </paragraph>
    </conditional_section>
  </section>
    
    <section name="ReceiptHeader">
    <conditional_section name="DuplicateReceipt">
      <paragraph style="HeadingTextStyle" alignment="center">
        <text converter="DuplicateReceiptHeaderConverter">
          <argument name="is_duplicate">${DUPLICATE_RECEIPT}</argument>
        </text>
      </paragraph>
    </conditional_section>
    <conditional_section name="ReceiptType">
      <paragraph style="HeadingTextStyle" alignment="center">
        <text converter="ReceiptTypeHeaderConverter">
          <argument name="receipt_type">${RECEIPT_TYPE}</argument>
        </text>
      </paragraph>
    </conditional_section>
    </section>


  <conditional_section name="ReceiptType1">
    <section name="RetentionReminder">
      <paragraph style="StandardTextStyle">
        <text alignment="center" converter="ReceiptTypeRetentionConverter">
          <argument name="receipt_type">${RECEIPT_TYPE}</argument>
          <argument name="cardholder_culture">${CARDHOLDER_CULTURE}</argument>
        </text>
      </paragraph>
    </section>
  </conditional_section>

  <conditional_section name="DeclarationCourtesyMessage">
    <section name="CourtesyMessage">
      <paragraph style="StandardTextStyle" alignment="center">
        <text>${DECLARATION_COURTESY_MESSAGE}</text>
      </paragraph>
    </section>
  </conditional_section>

  <section name="DiagnosticReceipt">
    <conditional_section name="CardDetailsCryptogramInformationData">
      <paragraph style="StandardTextstyl}" alignment="center">
        <field>
          <label converter="TextGlobalizationConverter">
            <argument name="text">CRYPTOGRAMINFORMATIONDATA</argument>
          </label>
          <value>${CRYPTOGRAM_INFORMATION_DATA}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="CardDetailsTerminalVerificationResult">
      <paragraph style="StandardTextStyle" alignment="center">
        <field>
          <label converter="TextGlobalizationConverter">
            <argument name="text">TERMINALVERIFICATIONRESULT</argument>
          </label>
          <value>${TERMINAL_VERIFICATION_RESULT}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="CardDetailsTransactionStatusInformation">
      <paragraph style="StandardTextStyle" alignment="center">
        <field>
          <label converter="TextGlobalizationConverter">
            <argument name="text">TRANSACTIONSTATUSINFORMATION</argument>
          </label>
          <value>${TRANSACTION_STATUS_INFORMATION}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="CardDetailsCardholderVerificationMethodResult">
      <paragraph style="StandardTextStyle" alignment="center">
        <field>
          <label converter="TextGlobalizationConverter">
            <argument name="text">CARDHOLDERVERIFICATIONMETHODRESULT</argument>
          </label>
          <value>${CARDHOLDER_VERIFICATION_METHOD_RESULT}</value>
        </field>
      </paragraph>
    </conditional_section>
    <conditional_section name="CardDetailsIssuerCodeTableIndex">
      <paragraph style="StandardTextStyle" alignment="center">
        <field>
          <label converter="TextGlobalizationConverter">
            <argument name="text">ISSUERCODETABLEINDEX</argument>
          </label>
          <value>${ISSUER_CODE_TABLE_INDEX}</value>
        </field>
      </paragraph>
    </conditional_section>
  </section>

</template>