praticamente si tratta di un integrazione con i metodi di pagamento in vBulletin.
quindi il costo lo scelgo cn vbulletin, ma per qst metodo di pagamento deve essere maggiore, per via delle transazioni.
è per qst ke $cost deve essere incrementato da la stesso
ecco com'è l'intera funzione
Codice PHP:
function generate_form_html($hash, $cost, $currency, $subinfo, $userinfo, $timeinfo)
{
global $vbphrase, $vbulletin, $show;
$item = $hash;
$currency = strtoupper($currency);
$cost = str_replace(".","",$cost);
$form['action'] = 'https://www.onebip.com/otms/';
$form['method'] = 'post';
$account = $this->settings['obaccount'];
// load settings into array so the template system can access them
$settings =& $this->settings;
$templater = vB_Template::create('subscription_payment_onebip');
$templater->register('account', $account);
$templater->register('cost', $cost);
$templater->register('currency', $currency);
$templater->register('item', $item);
$templater->register('settings', $settings);
$templater->register('subinfo', $subinfo);
$templater->register('timeinfo', $timeinfo);
$templater->register('userinfo', $userinfo);
$form['hiddenfields'] .= $templater->render();
return $form;
}
}