Add "Powered by Stripe"

https://www.drupal.org/node/2840328
This commit is contained in:
Matt
2017-02-18 18:57:53 -06:00
parent 0e1cd66d2d
commit 0e2671b975
2 changed files with 17 additions and 1 deletions

View File

@ -150,6 +150,15 @@ function uc_stripe_form_uc_cart_checkout_form_alter(&$form, &$form_state) {
'#weight' => -1000,
);
// Powered by Stripe (logo from https://stripe.com/about/resources)
if (variable_get('uc_stripe_poweredby', FALSE)) {
$payment_form['field_message'] = array(
'#type' => 'item',
'#markup' => "<a href='http://stripe.com'><img src=".'/' . drupal_get_path('module', 'uc_stripe') . '/images/solid-dark.svg' . " alt='Powered by Stripe'></a>",
'#weight' => 1,
);
}
$payment_form['stripe_token'] = array(
'#type' => 'hidden',
'#default_value' => 'default',
@ -310,7 +319,7 @@ function uc_stripe_settings_form() {
$form['uc_stripe_settings']['uc_stripe_poweredby'] = array(
'#type' => 'checkbox',
'#title' => t('Powered by Stripe'),
'#description' => 'Show "powered by Stripe" in shopping cart.',
'#description' => 'Show "powered by Stripe" in checkout.',
'#default_value' => variable_get('uc_stripe_poweredby', FALSE),
);