function uc_paypal_ec_form in Ubercart 5
Same name and namespace in other branches
- 6.2 payment/uc_paypal/uc_paypal.module \uc_paypal_ec_form()
- 7.3 payment/uc_paypal/uc_paypal.module \uc_paypal_ec_form()
1 string reference to 'uc_paypal_ec_form'
- uc_paypal_cart_pane in payment/
uc_paypal/ uc_paypal.module - Implementation of hook_cart_pane().
File
- payment/
uc_paypal/ uc_paypal.module, line 937 - Integrates various PayPal payment services and Instant Payment Notifications (IPN) with Ubercart!
Code
function uc_paypal_ec_form() {
if (!variable_get('uc_cap_uc_paypal_ec_enabled', FALSE)) {
return;
}
if (!function_exists('curl_init')) {
drupal_set_message(t('PayPal Express Checkout requires curl for PHP. Please talk to your system administrator to get this.'));
return;
}
// Hack to allow the image button to submit.
if (isset($_POST['submit_x'])) {
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'submit',
);
}
$form['submit_image'] = array(
'#value' => '<input name="submit" type="image" title="' . t('Checkout with PayPal.') . '" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckoutsm.gif">',
);
return $form;
}