You are here

function _uc_stripe_get_element_styles_array in Ubercart Stripe 7.3

Return value

array styles - An associative array of style overrides from the settings page.

1 call to _uc_stripe_get_element_styles_array()
uc_stripe_form_uc_cart_checkout_form_alter in ./uc_stripe.module
Implements hook_form_FORMID_alter() to change the checkout form All work as a result is done in JS, the ordinary post does not happen.

File

./uc_stripe.module, line 1259
A stripe.js PCI-compliant payment gateway Forked from Bitcookie's work (thanks!) which was posted at http://bitcookie.com/blog/pci-compliant-ubercart-and-stripe-js from discussion in the uc_stripe issue queue, https://www.drupal.org/node/1467886

Code

function _uc_stripe_get_element_styles_array() {
  $styles = array();
  $settings = variable_get('uc_stripe_element_styles', 'fontSize: 16px, color: black, iconColor: blue');
  $pairs = explode(',', $settings);
  foreach ($pairs as $pair) {
    $keyValue = explode(':', $pair);
    $key = trim($keyValue[0]);
    $value = trim($keyValue[1]);
    $styles[$key] = $value;
  }
  return $styles;
}