Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
8d84c630 | 3 | {* Copyright (C) 2003-2009 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 | ||
a7de4ef7 | 24 | <h1>Télépaiements</h1> |
0337d704 | 25 | |
91ebb7ff | 26 | {if $smarty.request.op eq "submit" and !$pl_errors} |
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> | |
98a7e9dc | 37 | <td><b>Montant</b></td> |
38 | <td>{$montant} €</td> | |
0337d704 | 39 | </tr> |
bff6d838 | 40 | {if $comment} |
41 | <tr> | |
42 | <td><b>Commentaire</b> | |
43 | <td>{$comment}</td> | |
44 | </tr> | |
45 | {/if} | |
0337d704 | 46 | <tr> |
47 | <td> </td> | |
48 | <td> | |
49 | <form method="post" action="{$pay->api->urlform}"> | |
50 | <div> | |
51 | <!-- infos commercant --> | |
52 | {foreach from=$pay->api->infos.commercant key="name" item="value"} | |
8a7fab54 | 53 | <input type="hidden" name="{$name}" value="{$value}" /> |
0337d704 | 54 | {/foreach} |
8a7fab54 | 55 | <!-- infos client --> |
0337d704 | 56 | {foreach from=$pay->api->infos.client key="name" item="value"} |
8a7fab54 | 57 | <input type="hidden" name="{$name}" value="{$value}" /> |
0337d704 | 58 | {/foreach} |
8a7fab54 | 59 | <!-- infos commande --> |
0337d704 | 60 | {foreach from=$pay->api->infos.commande key="name" item="value"} |
8a7fab54 | 61 | <input type="hidden" name="{$name}" value="{$value}" /> |
0337d704 | 62 | {/foreach} |
8a7fab54 | 63 | |
64 | <!-- infos divers --> | |
0337d704 | 65 | {foreach from=$pay->api->infos.divers key="name" item="value"} |
8a7fab54 | 66 | <input type="hidden" name="{$name}" value="{$value}" /> |
0337d704 | 67 | {/foreach} |
8a7fab54 | 68 | <input type="submit" value="Valider" /> |
0337d704 | 69 | </div> |
70 | </form> | |
71 | </td> | |
72 | </tr> | |
73 | </table> | |
74 | <p> | |
a7de4ef7 | 75 | En cliquant sur "Valider", tu seras redirigé{if $smarty.session.sexe}e{/if} vers le site de {$pay->api->nomsite}, où il te |
76 | sera demandé de saisir ton numéro de carte bancaire. Lorsque le paiement aura été effectué, tu | |
0337d704 | 77 | recevras une confirmation par email. |
78 | </p> | |
79 | {if $pay->api->text} | |
80 | <p> | |
81 | {$pay->api->text} | |
82 | </p> | |
83 | {/if} | |
3b3e9d15 | 84 | {if $evtlink} |
85 | <p class="erreur"> | |
a7de4ef7 | 86 | Si 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 | 87 | </p> |
88 | {/if} | |
0337d704 | 89 | |
90 | {else} | |
91 | ||
a2558f2b | 92 | <script type='text/javascript'> |
93 | {literal} | |
94 | function payment_submit(form) | |
95 | { | |
96 | form.op.value = 'select'; | |
97 | form.montant.value = 0; | |
f0cdf38c | 98 | form.action = 'payment/' + form.ref.value; |
a2558f2b | 99 | form.submit(); |
100 | } | |
101 | {/literal} | |
102 | </script> | |
103 | ||
6d85e513 | 104 | <form method="post" action="{$platal->pl_self()}"> |
0337d704 | 105 | </p> |
106 | <table class="bicol"> | |
107 | <tr> | |
a7de4ef7 | 108 | <th colspan="2">Effectuer un télépaiement</th> |
0337d704 | 109 | </tr> |
110 | <tr> | |
111 | <td>Transaction</td> | |
112 | <td> | |
98a7e9dc | 113 | {if $asso} |
114 | <strong>{$pay->text}</strong><input type="hidden" name="ref" value="{$pay->id}" /> | |
115 | {else} | |
a2558f2b | 116 | <select name="ref" onchange="payment_submit(this.form)"> |
1fec2305 SJ |
117 | {select_db_table table="`$prefix`paiements" valeur=$pay->id |
118 | where="WHERE FIND_IN_SET(\'old\',t.flags)=0" | |
8a7fab54 | 119 | join="LEFT JOIN groupex.asso AS g ON (t.asso_id = g.id)" group="g.nom"} |
0337d704 | 120 | </select> |
98a7e9dc | 121 | {/if} |
0337d704 | 122 | {if $pay->url} |
123 | <br /> | |
124 | <a href="{$pay->url}">plus d'informations</a> | |
125 | {/if} | |
126 | </td> | |
127 | </tr> | |
128 | <tr> | |
a7de4ef7 | 129 | <td>Méthode</td> |
0337d704 | 130 | <td> |
131 | <select name="methode"> | |
a2558f2b | 132 | {select_db_table table="paiement.methodes" valeur=$smarty.request.methode} |
0337d704 | 133 | </select> |
134 | </td> | |
135 | </tr> | |
136 | <tr> | |
98a7e9dc | 137 | <td>Montant</td> |
138 | <td><input type="text" name="montant" size="13" class='right' value="{$montant}" /> €</td> | |
0337d704 | 139 | </tr> |
140 | <tr> | |
bff6d838 | 141 | <td>Commentaire</td> |
142 | <td><textarea name="comment" rows="5" cols="30"></textarea></td> | |
143 | </tr> | |
144 | <tr> | |
0337d704 | 145 | <td> </td> |
146 | <td> | |
147 | <input type="hidden" name="op" value="submit" /> | |
148 | <input type="submit" value="Continuer" /> | |
149 | </td> | |
150 | </tr> | |
151 | </table> | |
152 | </form> | |
153 | ||
154 | {if $transactions} | |
e8439508 | 155 | <p class="descr">Tu as déjà effectué des paiements pour cette transaction :</p> |
0337d704 | 156 | <table class="bicol"> |
157 | <tr><th>Date</th><th>Montant</th></tr> | |
158 | {iterate from=$transactions item=t} | |
159 | <tr class="{cycle values="pair,impair"}"> | |
160 | <td>{$t.timestamp|date_format}</td> | |
f04ecf1b | 161 | <td>{$t.montant|replace:'EUR':'€'}</td> |
0337d704 | 162 | </tr> |
163 | {/iterate} | |
164 | </table> | |
165 | {/if} | |
166 | ||
167 | {/if} | |
168 | ||
169 | ||
a7de4ef7 | 170 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |