Skip to content
Snippets Groups Projects
Commit 14c2ee58 authored by Regis Houssin's avatar Regis Houssin
Browse files

Works on paypal module

Fix: force to credit card
parent 4c2866fc
No related branches found
No related tags found
No related merge requests found
......@@ -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>';
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment