/**
  * Overrides parent's _get_billing_values_from_form because we want to
  * get the country's 2-character ISO code, not the name like most gateways
  * @param EE_Billing_Info_Form $billing_form
  * @return array
  */
 protected function _get_billing_values_from_form($billing_form)
 {
     $billing_values = parent::_get_billing_values_from_form($billing_form);
     $billing_values['country'] = $billing_form->get_input_value('country');
     $billing_values['credit_card_type'] = $billing_form->get_input_value('credit_card_type');
     return $billing_values;
 }
 /**
  * Overrides parent so we always have all billing inputs in the returned array,
  * not just the ones included at the time. This helps simplify the gateway code
  * @param type $billing_form
  * @return array
  */
 protected function _get_billing_values_from_form($billing_form)
 {
     $all_billing_values_empty = array();
     foreach (array_keys($this->billing_input_names()) as $input_name) {
         $all_billing_values_empty[$input_name] = '';
     }
     return array_merge($all_billing_values_empty, parent::_get_billing_values_from_form($billing_form));
 }
 /**
  * Adjust the billing form data.
  * Need Country and State abbreviations, not full names.
  *
  * @param billing_form
  * @return array
  */
 protected function _get_billing_values_from_form($billing_form)
 {
     $billing_values = parent::_get_billing_values_from_form($billing_form);
     $billing_values['country'] = $billing_form->get_input_value('country');
     $state = EEM_State::instance()->get_col(array(array('STA_name' => $billing_values['state']), 'limit' => 1), 'STA_abbrev');
     $billing_values['state'] = $state[0];
     return $billing_values;
 }