if (GETPOST("action") == 'dopayment') { $PRICE=price2num(GETPOST("newamount"),'MT'); $email=GETPOST("email"); $mesg=''; if (empty($PRICE) || ! is_numeric($PRICE)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Amount")); elseif (empty($email)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("YourEMail")); elseif (! isValidEMail($email)) $mesg=$langs->trans("ErrorBadEMail",$email); elseif (empty($FULLTAG)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentCode")); if (empty($mesg)) { dol_syslog("newpayment.php call paybox api and do redirect", LOG_DEBUG); print_paybox_redirect($PRICE, $conf->monnaie, $email, $urlok, $urlko, $FULLTAG); session_destroy(); exit; } } /* * View */ llxHeaderPayBox($langs->trans("PaymentForm"));
if (empty($PRICE) || !is_numeric($PRICE)) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")); } elseif (empty($email)) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("YourEMail")); } elseif (!isValidEMail($email)) { $mesg = $langs->trans("ErrorBadEMail", $email); } elseif (empty($FULLTAG)) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentCode")); } elseif (dol_strlen($urlok) > 150) { $mesg = 'Error urlok too long ' . $urlok; } elseif (dol_strlen($urlko) > 150) { $mesg = 'Error urlko too long ' . $urlko; } if (empty($mesg)) { dol_syslog("newpayment.php call paybox api and do redirect", LOG_DEBUG); print_paybox_redirect($PRICE, $conf->currency, $email, $urlok, $urlko, $FULLTAG); session_destroy(); exit; } } /* * View */ llxHeaderPayBox($langs->trans("PaymentForm")); // Common variables $creditor = $mysoc->name; $paramcreditor = 'PAYBOX_CREDITOR_' . $suffix; if (!empty($conf->global->{$paramcreditor})) { $creditor = $conf->global->{$paramcreditor}; } else { if (!empty($conf->global->PAYBOX_CREDITOR)) {