Works on paypal module

Fix: force to credit card
This commit is contained in:
Regis Houssin 2011-05-25 14:01:42 +00:00
parent 4c2866fc57
commit 14c2ee5854
2 changed files with 6 additions and 4 deletions

View File

@ -311,7 +311,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
// Payment mode
print '<tr><td><span class="fieldrequired">'.$langs->trans('PaymentMode').'</span></td><td>';
$html->select_types_paiements(GETPOST('paiementcode'),'paiementcode','',2);
$html->select_types_paiements((GETPOST('paiementcode')?GETPOST('paiementcode'):$facture->mode_reglement_code),'paiementcode','',2);
print "</td>\n";
print '<td rowspan="'.$rowspan.'" valign="top">';
print '<textarea name="comment" wrap="soft" cols="60" rows="'.ROWS_4.'">'.(empty($_POST['comment'])?'':$_POST['comment']).'</textarea></td>';

View File

@ -160,9 +160,11 @@ if (isset($_GET['action']) && ! empty($_GET['action']) && isset($_GET['transacti
$object->socid=$soc->id;
$object->fetch_thirdparty();
$object->date = dol_now();
$object->ref_int = $_SESSION[$_GET['transaction_id']]['TRANSACTIONID'];
$shipamount = ($_SESSION[$_GET['transaction_id']]['SHIPPINGAMT']?$_SESSION[$_GET['transaction_id']]['SHIPPINGAMT']:$_SESSION[$_GET['transaction_id']]['SHIPAMOUNT']);
$object->date = dol_now();
$object->mode_reglement_id = 6; // Credit card by default
$object->cond_reglement_id = 1;
$object->ref_int = $_SESSION[$_GET['transaction_id']]['TRANSACTIONID'];
$shipamount = ($_SESSION[$_GET['transaction_id']]['SHIPPINGAMT']?$_SESSION[$_GET['transaction_id']]['SHIPPINGAMT']:$_SESSION[$_GET['transaction_id']]['SHIPAMOUNT']);
$object_id = $object->create($user);
if ($object_id > 0)