Merge pull request #12958 from pradpnayak/Tags
[civicrm-core.git] / templates / CRM / Contribute / Form / Contribution / AuthorizeNetARB.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
8c9251b3 5 | Copyright CiviCRM LLC (c) 2004-2018 |
6a488035
TO
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25*}
26{if $subscriptionType eq 'cancel'}
27<?xml version="1.0" encoding="utf-8"?>
28<ARBCancelSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
29 <merchantAuthentication>
30 <name>{$apiLogin}</name>
31 <transactionKey>{$paymentKey}</transactionKey>
32 </merchantAuthentication>
33 <subscriptionId>{$subscriptionId}</subscriptionId>
34</ARBCancelSubscriptionRequest>
35{elseif $subscriptionType eq 'updateBilling'}
36<?xml version="1.0" encoding="utf-8"?>
37<ARBUpdateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
38 <merchantAuthentication>
39 <name>{$apiLogin}</name>
40 <transactionKey>{$paymentKey}</transactionKey>
41 </merchantAuthentication>
42 <subscriptionId>{$subscriptionId}</subscriptionId>
43 <subscription>
44 <payment>
45 <creditCard>
46 <cardNumber>{$cardNumber}</cardNumber>
47 <expirationDate>{$expirationDate}</expirationDate>
48 </creditCard>
49 </payment>
50 <billTo>
51 <firstName>{$billingFirstName}</firstName>
52 <lastName>{$billingLastName}</lastName>
53 <address>{$billingAddress}</address>
54 <city>{$billingCity}</city>
55 <state>{$billingState}</state>
56 <zip>{$billingZip}</zip>
57 <country>{$billingCountry}</country>
58 </billTo>
59 </subscription>
60</ARBUpdateSubscriptionRequest>
61{elseif $subscriptionType eq 'update'}
62<?xml version="1.0" encoding="utf-8"?>
63<ARBUpdateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
64 <merchantAuthentication>
65 <name>{$apiLogin}</name>
66 <transactionKey>{$paymentKey}</transactionKey>
67 </merchantAuthentication>
68<subscriptionId>{$subscriptionId}</subscriptionId>
69 <subscription>
70 <paymentSchedule>
71 <totalOccurrences>{$totalOccurrences}</totalOccurrences>
72 </paymentSchedule>
73 <amount>{$amount}</amount>
74 </subscription>
75</ARBUpdateSubscriptionRequest>
76{else}
77<?xml version="1.0" encoding="utf-8"?>
78<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
79 <merchantAuthentication>
80 <name>{$apiLogin}</name>
81 <transactionKey>{$paymentKey}</transactionKey>
82 </merchantAuthentication>
83 <refId>{$refId}</refId>
84 <subscription>
85 {if $name}<name>{$name|truncate:50}</name>{/if}
86 <paymentSchedule>
87 <interval>
88 <length>{$intervalLength}</length>
89 <unit>{$intervalUnit}</unit>
90 </interval>
91 <startDate>{$startDate}</startDate>
92 <totalOccurrences>{$totalOccurrences}</totalOccurrences>
93 </paymentSchedule>
94 <amount>{$amount}</amount>
95 <payment>
96 <creditCard>
97 <cardNumber>{$cardNumber}</cardNumber>
98 <expirationDate>{$expirationDate}</expirationDate>
99 </creditCard>
100 </payment>
101 {if $invoiceNumber}
b2603e29 102 <order>
6a488035
TO
103 <invoiceNumber>{$invoiceNumber}</invoiceNumber>
104 {if $name}<description>{$name}</description>{/if}
105 </order>
b2603e29 106 {/if}
6a488035
TO
107 <customer>
108 <id>{$contactID}</id>
109 <email>{$email}</email>
110 </customer>
111 <billTo>
112 <firstName>{$billingFirstName}</firstName>
113 <lastName>{$billingLastName}</lastName>
114 <address>{$billingAddress}</address>
115 <city>{$billingCity}</city>
116 <state>{$billingState}</state>
117 <zip>{$billingZip}</zip>
118 <country>{$billingCountry}</country>
119 </billTo>
120 </subscription>
121</ARBCreateSubscriptionRequest>
232624b1 122{/if}