/**
  * gets form controls for custom paypal box
  */
 public static function get_custom_paypal_box()
 {
     global $post;
     $paypal = self::get_paypal_meta($post->ID);
     $options = self::get_paypal_options();
     /* make sure options ahve been saved */
     if (empty(self::options_errors())) {
         /* Use nonce for verification */
         printf('<div class="paypal-options"><input type="hidden" name="paypal_meta" id="paypal_meta" value="%s" />', wp_create_nonce('paypal_meta'));
         /* left column */
         printf('<p><label for="paypal_name">%s: </label><input type="text" id="paypal_name" name="paypal_name" value="%s" size="25" /></p>', __('Name of item', 'sppp'), $paypal["name"]);
         printf('<p><label for="paypal_code">%s: </label><input type="text" id="paypal_code" name="paypal_code" value="%s" size="25" /></p>', __('Item code', 'sppp'), $paypal["code"]);
         printf('<p><label for="paypal_price">%s: </label><input type="text" id="paypal_price" name="paypal_price" value="%s" size="5" /></p>', __('Price', 'sppp'), $paypal["price"]);
         $chckd = isset($paypal["includes_vat"]) && $paypal["includes_vat"] === true ? ' checked' : '';
         printf('<p class="inc-vat"><label for="includes_vat" class="cbx"><input type="checkbox" class="vat-cbx" id="includes_vat" name="includes_vat" value="1"%s /> %s</label></p>', $chckd, __('Check this box if the price includes VAT', 'sppp'));
         $chckd = isset($paypal["exempt_vat"]) && $paypal["exempt_vat"] === true ? ' checked' : '';
         printf('<p class="vat-ex"><label for="exempt_vat" class="cbx"><input type="checkbox" class="vat-cbx" id="exempt_vat" name="exempt_vat" value="1"%s /> %s</label></p>', $chckd, __('Check this box if the item is VAT exempt', 'sppp'));
         $current_method = SimplePayPalPluginAdmin::get_selected_shipping_method();
         call_user_func_array($current_method["item_form_callback"], array($options, $paypal["shipping_settings"]));
         printf('<p><label for="paypal_stock">%s: </label><input type="text" id="paypal_stock" name="paypal_stock" value="%s" size="5" /></p>', __('Stock (either the number of items or a message about availability)', 'sppp'), $paypal["stock"]);
         print '<div class="clear">&nbsp;</div></div>';
     } else {
         printf('<p>Please <a href="%s">visit the Paypal Options page</a> to configure the plugin.</p>', admin_url('admin.php?page=sppp_options'));
     }
 }
 /**
  * returns HTML for shipping table
  */
 public static function get_shipping_table($options)
 {
     $plugin_options = SimplePayPalPluginAdmin::get_paypal_options();
     $current_method = SimplePayPalPluginAdmin::get_selected_shipping_method();
     return call_user_func_array($current_method["shipping_table_callback"], array($options, $plugin_options));
 }