<?php

require_once 'app/Mage.php';
Mage::app();
$installer = new Mage_Customer_Model_Entity_Setup('core_setup');
$installer->startSetup();
$vCustomerEntityType = $installer->getEntityTypeId('customer');
$vCustAttributeSetId = $installer->getDefaultAttributeSetId($vCustomerEntityType);
$vCustAttributeGroupId = $installer->getDefaultAttributeGroupId($vCustomerEntityType, $vCustAttributeSetId);
$installer->addAttribute('customer', 'ziscorporate', array('label' => 'Customer Type', 'input' => 'select', 'type' => 'int', 'global' => 1, 'visible' => 1, 'visible_on_front' => 1, 'forms' => array('customer_account_edit', 'customer_account_create', 'adminhtml_customer', 'checkout_register'), 'source' => 'eav/entity_attribute_source_table', 'option' => array('values' => array(0 => 'Consumer', 1 => 'Corporate')), 'required' => 0, 'user_defined' => 0, 'position' => 20));
$installer->addAttributeToGroup($vCustomerEntityType, $vCustAttributeSetId, $vCustAttributeGroupId, 'ziscorporate', 0);
$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'ziscorporate');
$oAttribute->setData('used_in_forms', array('customer_account_edit', 'customer_account_create', 'adminhtml_customer', 'checkout_register'));
$oAttribute->save();
/* add corporate name */
$installer->addAttribute('customer', 'zcorporatename', array('label' => 'Corporate Name', 'input' => 'text', 'type' => 'varchar', 'global' => 1, 'visible' => 1, 'visible_on_front' => 1, 'forms' => array('customer_account_edit', 'customer_account_create', 'adminhtml_customer', 'checkout_register'), 'required' => 0, 'user_defined' => 0, 'position' => 21));
$installer->addAttributeToGroup($vCustomerEntityType, $vCustAttributeSetId, $vCustAttributeGroupId, 'zcorporatename', 0);
$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'zcorporatename');
$oAttribute->setData('used_in_forms', array('customer_account_edit', 'customer_account_create', 'adminhtml_customer', 'checkout_register'));
$oAttribute->save();
/* is approver */
$installer->addAttribute('customer', 'zcorporateapprover', array('label' => 'Corporate Approver', 'input' => 'select', 'type' => 'varchar', 'global' => 1, 'visible' => 1, 'visible_on_front' => 1, 'forms' => array('customer_account_edit', 'customer_account_create', 'adminhtml_customer', 'checkout_register'), 'source' => 'eav/entity_attribute_source_boolean', 'required' => 0, 'user_defined' => 0, 'position' => 22));
$installer->addAttributeToGroup($vCustomerEntityType, $vCustAttributeSetId, $vCustAttributeGroupId, 'zcorporateapprover', 0);
$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'zcorporateapprover');
$oAttribute->setData('used_in_forms', array('customer_account_edit', 'customer_account_create', 'adminhtml_customer', 'checkout_register'));
$oAttribute->save();
/* approver id - if not approver*/
$installer->addAttribute('customer', 'zmyapprover', array('label' => 'This Users Approver', 'input' => 'text', 'type' => 'int', 'global' => 1, 'visible' => 1, 'visible_on_front' => 1, 'forms' => array('customer_account_edit', 'customer_account_create', 'adminhtml_customer', 'checkout_register'), 'required' => 0, 'user_defined' => 0, 'position' => 23));
$installer->addAttributeToGroup($vCustomerEntityType, $vCustAttributeSetId, $vCustAttributeGroupId, 'zmyapprover', 0);
$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'zmyapprover');
$oAttribute->setData('used_in_forms', array('customer_account_edit', 'customer_account_create', 'adminhtml_customer', 'checkout_register'));
<?php

$installerCustomer = new Mage_Customer_Model_Entity_Setup('allopass_hipay_setup');
/* @var $installerCustomer Mage_Customer_Model_Entity_Setup */
$installerCustomer->startSetup();
$entityId = $installerCustomer->getEntityTypeId('customer');
$attribute = $installerCustomer->getAttribute($entityId, 'hipay_alias_oneclick');
if (!$attribute) {
    $installerCustomer->addAttribute('customer', 'hipay_alias_oneclick', array('type' => 'varchar', 'label' => 'Alias Oneclick Hipay', 'visible' => true, 'required' => false, 'unique' => false, 'sort_order' => 700, 'default' => 0, 'input' => 'text'));
    $usedInForms = array('adminhtml_customer');
    $attribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'hipay_alias_oneclick');
    $attribute->setData('used_in_forms', $usedInForms);
    $attribute->setData('sort_order', 700);
    $attribute->save();
}
$entityId = $installerCustomer->getEntityTypeId('customer');
$attribute = $installerCustomer->getAttribute($entityId, 'hipay_alias_recurring');
if (!$attribute) {
    $installerCustomer->addAttribute('customer', 'hipay_alias_recurring', array('type' => 'varchar', 'label' => 'Alias Recurring Hipay', 'visible' => true, 'required' => false, 'unique' => false, 'sort_order' => 710, 'default' => 0, 'input' => 'text'));
    $usedInForms = array('adminhtml_customer');
    $attribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'hipay_alias_recurring');
    $attribute->setData('used_in_forms', $usedInForms);
    $attribute->setData('sort_order', 700);
    $attribute->save();
}
$attribute = $installerCustomer->getAttribute($entityId, 'hipay_cc_number_enc');
if (!$attribute) {
    $installerCustomer->addAttribute('customer', 'hipay_cc_number_enc', array('type' => 'varchar', 'label' => 'Card number encrypted hipay', 'visible' => true, 'required' => false, 'unique' => false, 'sort_order' => 750, 'default' => 0, 'input' => 'text'));
    $usedInForms = array('adminhtml_customer');
    $attribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'hipay_cc_number_enc');
    $attribute->setData('used_in_forms', $usedInForms);