function uc_paypal_wpp_settings_form in Ubercart 6.2
Same name and namespace in other branches
- 5 payment/uc_paypal/uc_paypal.module \uc_paypal_wpp_settings_form()
- 7.3 payment/uc_paypal/uc_paypal.module \uc_paypal_wpp_settings_form()
Settings for Website Payments Pro on the Payment gateways form.
1 string reference to 'uc_paypal_wpp_settings_form'
- uc_paypal_payment_gateway in payment/
uc_paypal/ uc_paypal.module - Implements hook_payment_gateway().
File
- payment/
uc_paypal/ uc_paypal.module, line 214 - Integrates various PayPal payment services and Instant Payment Notifications (IPN) with Ubercart!
Code
function uc_paypal_wpp_settings_form() {
// The DoDirectPayment API call allows fewer currencies than PayPal in general.
$form['paypal_wpp']['uc_paypal_wpp_currency'] = array(
'#type' => 'select',
'#title' => t('Currency code'),
'#description' => t('Transactions can only be processed in one of the listed currencies.'),
'#options' => _uc_paypal_currency_array(),
'#default_value' => variable_get('uc_paypal_wpp_currency', 'USD'),
);
$form['paypal_wpp']['uc_paypal_wpp_server'] = array(
'#type' => 'select',
'#title' => t('API server'),
'#description' => t('Sign up for and use a Sandbox account for testing.'),
'#options' => array(
'https://api-3t.sandbox.paypal.com/nvp' => t('Sandbox'),
'https://api-3t.paypal.com/nvp' => t('Live'),
),
'#default_value' => variable_get('uc_paypal_wpp_server', 'https://api-3t.sandbox.paypal.com/nvp'),
);
$form['paypal_wpp']['ec'] = array(
'#type' => 'fieldset',
'#title' => t('Express Checkout'),
'#description' => t('These settings are specifically for the alternate checkout system offered by Express Checkout.<br />To enable this on your site, you must enable the corresponding cart pane in the <em>Cart settings</em> menu.'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['paypal_wpp']['ec']['uc_paypal_wps_email'] = array(
'#type' => 'textfield',
'#title' => t('PayPal e-mail address'),
'#description' => t('The e-mail address you use for the PayPal account you want to receive payments.'),
'#default_value' => variable_get('uc_paypal_wps_email', ''),
);
$form['paypal_wpp']['ec']['uc_paypal_ec_rqconfirmed_addr'] = array(
'#type' => 'checkbox',
'#title' => t('Require Express Checkout users to use a PayPal confirmed shipping address.'),
'#default_value' => variable_get('uc_paypal_ec_rqconfirmed_addr', FALSE),
);
$form['paypal_wpp']['ec']['uc_paypal_ec_review_shipping'] = array(
'#type' => 'checkbox',
'#title' => t('Enable the shipping select form on the Review payment page.'),
'#default_value' => variable_get('uc_paypal_ec_review_shipping', TRUE),
);
$form['paypal_wpp']['ec']['uc_paypal_ec_review_company'] = array(
'#type' => 'checkbox',
'#title' => t('Enable the company name box on the Review payment page.'),
'#default_value' => variable_get('uc_paypal_ec_review_company', TRUE),
);
$form['paypal_wpp']['ec']['uc_paypal_ec_review_phone'] = array(
'#type' => 'checkbox',
'#title' => t('Enable the contact phone number box on the Review payment page.'),
'#default_value' => variable_get('uc_paypal_ec_review_phone', TRUE),
);
$form['paypal_wpp']['ec']['uc_paypal_ec_review_comment'] = array(
'#type' => 'checkbox',
'#title' => t('Enable the comment text box on the Review payment page.'),
'#default_value' => variable_get('uc_paypal_ec_review_comment', TRUE),
);
$form['paypal_wpp']['api'] = array(
'#type' => 'fieldset',
'#title' => t('API credentials'),
'#description' => t('!link for information on obtaining credentials. You need to acquire an API Signature. If you have already requested API credentials, you can review your settings under the API Access section of your PayPal profile.', array(
'!link' => l(t('Click here'), 'https://www.paypal.com/IntegrationCenter/ic_certificate.html'),
)),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['paypal_wpp']['api']['uc_paypal_api_username'] = array(
'#type' => 'textfield',
'#title' => t('API username'),
'#default_value' => variable_get('uc_paypal_api_username', ''),
);
$form['paypal_wpp']['api']['uc_paypal_api_password'] = array(
'#type' => 'textfield',
'#title' => t('API password'),
'#default_value' => variable_get('uc_paypal_api_password', ''),
);
$form['paypal_wpp']['api']['uc_paypal_api_signature'] = array(
'#type' => 'textfield',
'#title' => t('Signature'),
'#default_value' => variable_get('uc_paypal_api_signature', ''),
);
return $form;
}