merge
[platal.git] / templates / payment / index.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
50a40a33 3{* Copyright (C) 2003-2006 Polytechnique.org *}
0337d704 4{* http://opensource.polytechnique.org/ *}
5{* *}
6{* This program is free software; you can redistribute it and/or modify *}
7{* it under the terms of the GNU General Public License as published by *}
8{* the Free Software Foundation; either version 2 of the License, or *}
9{* (at your option) any later version. *}
10{* *}
11{* This program is distributed in the hope that it will be useful, *}
12{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14{* GNU General Public License for more details. *}
15{* *}
16{* You should have received a copy of the GNU General Public License *}
17{* along with this program; if not, write to the Free Software *}
18{* Foundation, Inc., *}
19{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
20{* *}
21{**************************************************************************}
22
23
8c32e44f 24<h1>Télépaiements</h1>
0337d704 25
3600bf88 26{if $smarty.request.op eq "submit" and !$xorg_errors|count}
0337d704 27
28<table class="bicol">
29 <tr>
30 <th colspan="2">Paiement via {$meth->text}</th>
31 </tr>
32 <tr>
33 <td><b>Transaction</b></td>
34 <td>{$pay->text}</td>
35 </tr>
36 <tr>
37 <td><b>Montant (euros)</b></td>
38 <td>{$montant}</td>
39 </tr>
40 <tr>
41 <td>&nbsp;</td>
42 <td>
43 <form method="post" action="{$pay->api->urlform}">
44 <div>
45 <!-- infos commercant -->
46 {foreach from=$pay->api->infos.commercant key="name" item="value"}
47 <input type="hidden" name="{$name}" value="{$value}" />
48 {/foreach}
49 <!-- infos client -->
50 {foreach from=$pay->api->infos.client key="name" item="value"}
51 <input type="hidden" name="{$name}" value="{$value}" />
52 {/foreach}
53 <!-- infos commande -->
54 {foreach from=$pay->api->infos.commande key="name" item="value"}
55 <input type="hidden" name="{$name}" value="{$value}" />
56 {/foreach}
57
58 <!-- infos divers -->
59 {foreach from=$pay->api->infos.divers key="name" item="value"}
60 <input type="hidden" name="{$name}" value="{$value}" />
61 {/foreach}
62 <input type="submit" value="Valider" />
63 </div>
64 </form>
65 </td>
66 </tr>
67</table>
68<p>
69En cliquant sur "Valider", tu seras redirigé{if $smarty.session.sexe}e{/if} vers le site de {$pay->api->nomsite}, où il te
70sera demandé de saisir ton numéro de carte bancaire. Lorsque le paiement aura été effectué, tu
71recevras une confirmation par email.
72</p>
73{if $pay->api->text}
74<p>
75{$pay->api->text}
76</p>
77{/if}
3b3e9d15 78{if $evtlink}
79<p class="erreur">
a2fa0614 80Si tu n'es pas encore inscrit à cet événement, n'oublie pas d'aller t'<a href='http://www.polytechnique.net/{$evtlink.diminutif}/events/sub/{$evtlink.eid}'>inscrire</a>.
3b3e9d15 81</p>
82{/if}
0337d704 83
84{else}
85
a2558f2b 86<script type='text/javascript'>
87{literal}
88function payment_submit(form)
89{
90 form.op.value = 'select';
91 form.montant.value = 0;
92 form.action = form.action + '/' + form.ref.value;
93 form.submit();
94}
95{/literal}
96</script>
97
6d85e513 98<form method="post" action="{$platal->pl_self()}">
0337d704 99 <p> Si tu ne souhaites pas utiliser notre interface de
100 télépaiement, tu peux virer directement la somme de ton choix sur notre compte
101 30004 00314 00010016782 60. Nous veillerons à ce que ton paiement parvienne à
102 son destinataire. Pense toutefois à le préciser dans le motif du
103 versement.
104 <br /><br />
105 </p>
106 <table class="bicol">
107 <tr>
108 <th colspan="2">Effectuer un télépaiement</th>
109 </tr>
110 <tr>
111 <td>Transaction</td>
112 <td>
a2558f2b 113 <select name="ref" onchange="payment_submit(this.form)">
0337d704 114 {select_db_table table="`$prefix`paiements" valeur=$pay->id where=" WHERE FIND_IN_SET('old',flags)=0"}
115 </select>
116 {if $pay->url}
117 <br />
118 <a href="{$pay->url}">plus d'informations</a>
119 {/if}
120 </td>
121 </tr>
122 <tr>
123 <td>Méthode</td>
124 <td>
125 <select name="methode">
a2558f2b 126 {select_db_table table="paiement.methodes" valeur=$smarty.request.methode}
0337d704 127 </select>
128 </td>
129 </tr>
130 <tr>
131 <td>Montant (euros)</td>
132 <td><input type="text" name="montant" size="13" class='right' value="{$montant}" /></td>
133 </tr>
134 <tr>
135 <td>&nbsp;</td>
136 <td>
137 <input type="hidden" name="op" value="submit" />
138 <input type="submit" value="Continuer" />
139 </td>
140 </tr>
141 </table>
142</form>
143
144{if $transactions}
145<p class="descr">Tu as déjà effecuté des paiements pour cette transaction :</p>
146<table class="bicol">
147<tr><th>Date</th><th>Montant</th></tr>
148{iterate from=$transactions item=t}
149 <tr class="{cycle values="pair,impair"}">
150 <td>{$t.timestamp|date_format}</td>
151 <td>{$t.montant}</td>
152 </tr>
153{/iterate}
154</table>
155{/if}
156
157{/if}
158
159
160{* vim:set et sw=2 sts=2 sws=2: *}