This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WordPress Shopping Cart: Redirect/Hosted Payment Gateway step 6 | |
// http://tribulant.com/docs/wordpress-shopping-cart-plugin/7190 | |
<?php | |
function process_order($order = null, $user = null, $params = null) { | |
global $wpcoDb, $Order, $Item; | |
$wpcoDb -> model = $Item -> model; | |
$items = $wpcoDb -> find_all(array('order_id' => $order -> id)); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WordPress Shopping Cart: Redirect/Hosted Payment Gateway step 5 | |
// http://tribulant.com/docs/wordpress-shopping-cart-plugin/7190 | |
<!-- Gateway Settings --> | |
<table class="form-table"> | |
<tbody> | |
<tr> | |
<th><label for="gateway_title"><?php _e('Title', $this -> plugin_name); ?></label></th> | |
<td> | |
<input type="text" name="gateway_title" value="<?php echo wpco_get_option('gateway_title'); ?>" id="gateway_title" class="widefat" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WordPress Shopping Cart: Redirect/Hosted Payment Gateway step 4 | |
// http://tribulant.com/docs/wordpress-shopping-cart-plugin/7190 | |
function gateway_pmethods_metaboxes($page = null, $position = null, $post = null) { | |
add_meta_box('gateway', __('Gateway', 'checkout-gateway'), 'gateway_metabox_settings', $page, $position, 'core'); | |
return true; | |
} | |
function gateway_metabox_settings() { | |
include dirname(__FILE__) . '/settings.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WordPress Shopping Cart: Redirect/Hosted Payment Gateway step 3 | |
// http://tribulant.com/docs/wordpress-shopping-cart-plugin/7190 | |
function gateway_pmethods_list($active = null, $cssclass = null) { | |
?> | |
<tr class="<?php echo $cssclass = (empty($cssclass)) ? 'alternate' : ''; ?>"> | |
<td><label><input <?php echo (!empty($active) && is_array($active) && in_array('gateway', $active)) ? 'checked="checked"' : ''; ?> type="checkbox" name="paymentmethods[]" value="gateway" /> <?php _e('Gateway', 'checkout-gateway'); ?></label></td> | |
</tr> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WordPress Shopping Cart: Redirect/Hosted Payment Gateway step 2 | |
// http://tribulant.com/docs/wordpress-shopping-cart-plugin/7190 | |
function gateway_extensions_list($extensions = null) { | |
$extensions['gateway'] = array( | |
'name' => __('Gateway', 'checkout-gateway'), | |
'link' => "http://domain.com/gateway/", | |
'image' => plugins_url() . '/gateway/icon.jpg', | |
'description' => __("Gateway which sends customers through to a secure payment page.", 'checkout-gateway'), | |
'slug' => 'gateway', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WordPress Shopping Cart: Redirect/Hosted Payment Gateway step 1 | |
// http://tribulant.com/docs/wordpress-shopping-cart-plugin/7190 | |
function gateway_activation_hook() { | |
require_once ABSPATH . 'wp-admin' . DS . 'admin-functions.php'; | |
$path = 'wp-checkout' . DS . 'wp-checkout.php'; | |
if (!is_plugin_active(plugin_basename($path))) { | |
_e('You must have the Shopping Cart plugin installed and activated in order to use this.', "checkout-gateway"); | |
exit(); die(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = 'http://domain.com/wp-admin/admin-ajax.php?action=newsletters_api'; | |
$data = array( | |
'api_method' => 'subscriber_add', | |
'api_key' => '37C1D6053E817212348E507D29CCCE49', | |
'api_data' => array( | |
'email' => "email@domain.com", | |
'list_id' => array(1,2,3), | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ColorBox Core Style: | |
The following CSS is consistent between example themes and should not be altered. | |
*/ | |
#colorbox, #cboxOverlay, #cboxWrapper{position: absolute; | |
top: 0; | |
left: 0; | |
z-index: 9999; | |
overflow: hidden; | |
border-bottom: 21px white solid; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Source: http://www.carronmedia.com/uk-postal-counties-list | |
array( | |
'England' => array( | |
'Avon', | |
'Bedfordshire', | |
'Berkshire', | |
'Buckinghamshire', |