Changeset 43907 in spip-zone
- Timestamp:
- Jan 27, 2011, 11:04:19 AM (10 years ago)
- Location:
- _plugins_/spipal
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/spipal/action/spipal_valider_paiement.php
r43660 r43907 98 98 { 99 99 $custom = @unserialize($env['custom']); 100 $id = ($custom['id_auteur'] < 0) ? (0-$custom['id_auteur']) : $custom['id_auteur']; 100 101 $res = array('item_number' => $env['item_number'], 101 'id_auteur' => $ custom['id_auteur'],102 'id_auteur' => $id, 102 103 'versement_ht' => (($env['payment_gross']?$env['payment_gross']:$env['mc_gross']) - $env['tax']), 103 104 'versement_taxes' => $env['tax'], -
_plugins_/spipal/balise/formulaire_payer.php
r43887 r43907 28 28 if (!is_numeric($row['quantite'])) $row['quantite'] = 1; 29 29 30 $row['taxes'] = $row['don'] <=1 ? 0 31 : round($row['prix_unitaire_ht'] * $row['tva'] / 100, 2); 30 if ($row['don'] <=1) { 31 if (!$row['prix_unitaire_ht']) 32 $row['prix_unitaire_ht'] = _request('don'); 33 $row['taxes'] = 0; 34 } else { 35 $row['taxes'] = round($row['prix_unitaire_ht'] * $row['tva'] / 100, 2); 36 } 32 37 $row['prix_unitaire_ttc'] = $row['taxes'] + $row['prix_unitaire_ht']; 33 38 $row['total_ttc'] = $row['quantite'] * $row['prix_unitaire_ttc']; … … 36 41 $id = isset($GLOBALS['auteur_session']['id_auteur']) 37 42 ? $GLOBALS['auteur_session']['id_auteur'] 38 : 0;43 : (0 - intval(_request('id_auteur'))); 39 44 40 45 $row['custom'] = serialize(array('id_auteur' => $id, 'validation' => $validation)); -
_plugins_/spipal/formulaires/payer.html
r43887 r43907 5 5 <input type="hidden" name="item_number" value="#ENV{ref_produit}" /> 6 6 <input type="hidden" name="business" value="#META{/spipal/compte_paypal}" /> 7 [(#ENV{ don}|>{1}|?{'', ' '})7 [(#ENV{taxes}|?{'', ' '}) 8 8 <input type="hidden" name="quantity" value="1" /> 9 <input type=" [(#ENV{prix_unitaire_ttc}|=={0}|?{hidden,text})]"9 <input type="text" 10 10 name="amount" 11 11 value="#ENV{prix_unitaire_ttc}" 12 12 size="5" style="text-align: right" /> 13 ][(#ENV{ don}|>{1}|?{' ', ''})13 ][(#ENV{taxes}|?{' ', ''}) 14 14 <input type="text" name="quantity" value="#ENV{quantity,1}" size="5" readonly="readonly" style="text-align: center" /> x 15 15 <input type="text" name="amount_ttc" size="5" style="text-align: right" disabled="disabled" value="[(#ENV{prix_unitaire_ttc})]" /> … … 24 24 <input type="hidden" name="return" value="#META{/spipal/url_retour}" /> 25 25 <input type="hidden" name="notify_url" value="#META{/spipal/notify_url}" /> 26 <img src="https://www.paypal.com/<:spipal:lang_lang:>/i/btn/x-click-but0[(#ENV{ don}|=={1}|?{4,2})].gif" style="margin: 0px; border: 0px none transparent; cursor:pointer; vertical-align: middle;" onclick="document.getElementById('_xclick').submit();" alt=""/>26 <img src="https://www.paypal.com/<:spipal:lang_lang:>/i/btn/x-click-but0[(#ENV{taxes}|?{4,2})].gif" style="margin: 0px; border: 0px none transparent; cursor:pointer; vertical-align: middle;" onclick="document.getElementById('_xclick').submit();" alt=""/> 27 27 </div> 28 28 </form>
Note: See TracChangeset
for help on using the changeset viewer.