summaryrefslogtreecommitdiff
path: root/addons/pos_mercury/views/pos_mercury_transaction_templates.xml
blob: 41e268c9248348c63cef76f25671f4832b6928e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version='1.0' encoding='utf-8'?>
<odoo>
  <data>
    <template id='mercury_common'>
      <MerchantID><t t-esc='merchant_id'/></MerchantID>
      <TranType><t t-esc='transaction_type'/></TranType>
      <TranCode><t t-esc='transaction_code'/></TranCode>
      <InvoiceNo><t t-esc='invoice_no'/></InvoiceNo>
      <Frequency t-translation="off">OneTime</Frequency>
    </template>

    <template id='mercury_transaction'>
      <TStream t-translation="off">
        <Transaction>
          <t t-call='pos_mercury.mercury_common'/>
          <OperatorID><t t-esc='operator_id'/></OperatorID>
          <RecordNo>RecordNumberRequested</RecordNo>
          <PartialAuth>Allow</PartialAuth>
          <Memo><t t-esc='memo'/></Memo>
          <Account>
            <AccountSource>Swiped</AccountSource>
            <EncryptedBlock><t t-esc='encrypted_block'/></EncryptedBlock>
            <EncryptedKey><t t-esc='encrypted_key'/></EncryptedKey>
            <EncryptedFormat>MagneSafe</EncryptedFormat>
          </Account>
          <Amount>
            <Purchase><t t-esc='"%.2f" % purchase'/></Purchase> <!-- format required by Vantiv -->
          </Amount>
        </Transaction>
      </TStream>
    </template>

    <template id='mercury_voidsale'>
      <TStream t-translation="off">
        <Transaction>
          <t t-call='pos_mercury.mercury_common'/>
          <RefNo><t t-esc='ref_no'/></RefNo>
          <RecordNo><t t-esc='record_no'/></RecordNo>
          <Memo><t t-esc='memo'/></Memo>
          <Amount>
            <Purchase><t t-esc='"%.2f" % authorize'/></Purchase> <!-- format required by Vantiv -->
          </Amount>
          <TranInfo>
            <AuthCode><t t-esc='auth_code'/></AuthCode>
            <t t-if='not is_voidsale'>
              <AcqRefData><t t-esc='acq_ref_data'/></AcqRefData>
              <ProcessData><t t-esc='process_data'/></ProcessData>
            </t>
          </TranInfo>
        </Transaction>
      </TStream>
    </template>

    <template id='mercury_return'>
      <TStream t-translation="off">
        <Transaction>
          <t t-call='pos_mercury.mercury_common'/>
          <OperatorID><t t-esc='operator_id'/></OperatorID>
          <PartialAuth>Allow</PartialAuth>
          <RefNo><t t-esc='ref_no'/></RefNo>
          <RecordNo><t t-esc='record_no'/></RecordNo>
          <Amount>
            <Purchase><t t-esc='"%.2f" % purchase'/></Purchase>
          </Amount>
        </Transaction>
      </TStream>
    </template>
  </data>
</odoo>