function userForm($config_object = null, $user_data = null) { $form = ''; $cash_amount = new textcontrol("", 20, false, 20, "", true); $cash_amount->id = "cash_amount"; $form .= $cash_amount->toHTML("Cash Amount", "cash_amount"); return $form; }
function userForm() { // make sure we have some billing options saved. //if (empty($this->opts)) return false; //exponent_javascript_toFoot('creditcard',"",null,'', URL_FULL.'framework/core/subsystems/forms/js/AuthorizeNet.validate.js'); //$opts->first_name = isset($this->opts->first_name) ? $this->opts->first_name : null; //$opts->last_name = isset($this->opts->last_name) ? $this->opts->last_name : null; $this->opts = expSession::get('billing_options'); $opts->cc_type = isset($this->opts->cc_type) ? $this->opts->cc_type : null; $opts->cc_number = isset($this->opts->cc_number) ? $this->opts->cc_number : null; $opts->exp_month = isset($this->opts->exp_month) ? $this->opts->exp_month : null; $opts->exp_year = isset($this->opts->exp_year) ? $this->opts->exp_year : null; $opts->cvv = isset($this->opts->cvv) ? $this->opts->cvv : null; $form = ''; /* FIXME: hard coded options!! if ($config_object->accept_amex) $cards["AmExCard"] = "American Express"; if ($config_object->accept_discover) $cards["DiscoverCard"] = "Discover"; if ($config_object->accept_mastercard) $cards["MasterCard"] = "MasterCard"; if ($config_object->accept_visa) $cards["VisaCard"] = "Visa"; */ //$fname = new textcontrol($opts->first_name); //$lname = new textcontrol($opts->last_name); /* $cardtypes = new dropdowncontrol($opts->cc_type,$this->getAvailableCards()); $cardnumber = new textcontrol($opts->cc_number,20,false,20,"integer", true); $expiration = new monthyearcontrol($opts->exp_month, $opts->exp_year); $cvv = new textcontrol($opts->cvv,4,false,4,"integer", true); $cvvhelp = new htmlcontrol("<a href='http://en.wikipedia.org/wiki/Card_Verification_Value' target='_blank'>What's this?</a>"); */ $cardtypes = new dropdowncontrol("", $this->getAvailableCards()); $cardnumber = new textcontrol("", 20, false, 20, "integer", true); $expiration = new monthyearcontrol("", ""); $cvv = new textcontrol("", 4, false, 4, "integer", true); //$cvvhelp = new htmlcontrol("<a href='http://en.wikipedia.org/wiki/Card_Verification_Value' target='_blank'>What's this?</a>"); $cardtypes->id = "cc_type"; $cardnumber->id = "cc_number"; $expiration->id = "expiration"; $cvv->id = "cvv"; $cvv->size = 5; //$cvvhelp->id = "cvvhelp"; //$form .= $fname->toHTML("First Name", "first_name"); //$form .= $lname->toHTML("Last Name", "last_name"); $form .= $cardtypes->toHTML("Card Type", "cc_type"); $form .= $cardnumber->toHTML("Card #", "cc_number"); //$form .= "<strong class=\"example\">Example: 1234567890987654</strong>"; $form .= $expiration->toHTML("Expiration", "expiration"); $form .= $cvv->toHTML("CVV # <br /><a href='http://en.wikipedia.org/wiki/Card_Verification_Value' target='_blank'>What's this?</a>", 'cvv'); //$form .= $cvvhelp->toHTML('', 'cvvhelp'); //$form .= "<a class=\"exp-ecom-link-dis continue\" href=\"#\" id=\"checkoutnow\"><strong><em>Continue Checkout</em></strong></a>"; //$form .= '<input id="cont-checkout" type="submit" value="Continue Checkout">'; return $form; }