Esempio n. 1
0
function _wpsc_filter_merchant_v3_gateway_form($form, $gateway_id)
{
    if (!WPSC_Payment_Gateways::is_registered($gateway_id)) {
        return $form;
    }
    $payment_gateway_names = get_option('payment_gateway_names');
    $form = array();
    $output = array('name' => ' ', 'form_fields' => __('To configure a payment module select one on the left.', 'wpsc'), 'has_submit_button' => 0);
    $gateway = wpsc_get_payment_gateway($gateway_id);
    $display_name = empty($payment_gateway_names[$gateway_id]) ? $gateway->get_title() : $payment_gateway_names[$gateway_id];
    ob_start();
    ?>
	<tr>
		<td style='border-top: none;'>
			<?php 
    _e('Display Name', 'wpsc');
    ?>
		</td>
		<td style='border-top: none;'>
			<input type='text' name='user_defined_name[<?php 
    echo esc_attr($gateway_id);
    ?>
]' value='<?php 
    echo esc_attr($display_name);
    ?>
' /><br />
			<span class='small description'><?php 
    _e('The text that people see when making a purchase.', 'wpsc');
    ?>
</span>
		</td>
	</tr>
	<?php 
    $gateway->setup_form();
    $output = array('name' => $gateway->get_title(), 'form_fields' => ob_get_clean(), 'has_submit_button' => 0);
    return $output;
}
Esempio n. 2
0
function wpsc_is_payment_gateway_registered($gateway)
{
    return WPSC_Payment_Gateways::is_registered($gateway);
}