Changeset 3145934
- Timestamp:
- 09/03/2024 12:26:38 PM (18 months ago)
- Location:
- everypay-payment-gateway/trunk
- Files:
-
- 9 edited
-
assets/css/everypay_modal.css (modified) (3 diffs)
-
assets/js/everypay.js (modified) (1 diff)
-
assets/js/everypay_modal.js (modified) (1 diff)
-
assets/js/helpers.js (modified) (2 diffs)
-
changelog.txt (modified) (1 diff)
-
everypay-payment-gateway.php (modified) (1 diff)
-
includes/class-wc-everypay-api.php (modified) (1 diff)
-
includes/class-wc-everypay-renderer.php (modified) (2 diffs)
-
includes/payment-methods/class-wc-everypay-gateway.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
everypay-payment-gateway/trunk/assets/css/everypay_modal.css
r2518089 r3145934 10 10 min-width: 100%; 11 11 min-height: 100%; 12 height: 100%;13 12 overflow: hidden; 14 13 background-color: rgb(0,0,0); … … 65 64 align-self: center; 66 65 display: flex; 66 column-gap: 4px; 67 67 align-items: center; 68 68 margin-bottom: 1vw; … … 74 74 font-size: 13px; 75 75 color: rgba(0, 0, 0, 0.87); 76 margin-bottom: 0; 76 77 } 77 78 -
everypay-payment-gateway/trunk/assets/js/everypay.js
r2507281 r3145934 76 76 77 77 payload.data = { 78 ...payload.data, 78 79 cardToken: tokenized_card.getAttribute('crd'), 79 80 cardType: tokenized_card.getAttribute('card_type'), -
everypay-payment-gateway/trunk/assets/js/everypay_modal.js
r2507281 r3145934 104 104 105 105 this.createSaveCardCheckbox = function() { 106 var payformDiv = document.querySelector('# pay-form');106 var payformDiv = document.querySelector('#everypay-modal-content'); 107 107 if (!payformDiv || document.getElementById('everypay-save-card-box')) { 108 108 return; -
everypay-payment-gateway/trunk/assets/js/helpers.js
r2507281 r3145934 4 4 pk: everypayData.pk, 5 5 amount: everypayData.amount, 6 display: {7 staticCardPlaceholder: true8 }6 display: { 7 staticCardPlaceholder: true 8 } 9 9 }; 10 10 … … 18 18 addressLine1: everypayData.billing_address 19 19 }, 20 } 21 } 22 23 if (everypayData.phone && typeof everypayData.phone === 'string') { 24 payload.data = { 25 ...payload.data, 26 phone: everypayData.phone, 27 } 28 } 29 30 if (everypayData.email && typeof everypayData.email === 'string') { 31 payload.data = { 32 ...payload.data, 33 email: everypayData.email, 20 34 } 21 35 } -
everypay-payment-gateway/trunk/changelog.txt
r2518089 r3145934 15 15 = 3.5 - 2021-04-20 = 16 16 * Polylang removed. 17 18 = 3.6 - 2024-09-03 = 19 * Visa requirements -
everypay-payment-gateway/trunk/everypay-payment-gateway.php
r2518089 r3145934 4 4 * Plugin URI: https://wordpress.org/plugins/everypay-woocommerce-addon/ 5 5 * Description: This plugin adds a payment option in WooCommerce for customers to pay with their Credit Cards Via Everypay. 6 * Version: 3. 56 * Version: 3.6 7 7 * Author: Everypay S.A. 8 8 * Author URI: https://everypay.gr -
everypay-payment-gateway/trunk/includes/class-wc-everypay-api.php
r2473167 r3145934 120 120 * @return array 121 121 */ 122 private static function request(string $url, array $params = array(), string $method = 'POST')123 {124 $apiKey = self::getApiKey();122 private static function request(string $url, array $params = array(), string $method = 'POST') 123 { 124 $apiKey = self::getApiKey(); 125 125 126 if (!$apiKey) {127 throw new Exception('api secret key is missing');128 }129 $query = http_build_query($params, null, '&');130 $curl = curl_init();131 curl_setopt($curl, CURLOPT_TIMEOUT, 30);132 curl_setopt($curl, CURLOPT_CUSTOMREQUEST, strtoupper($method));133 curl_setopt($curl, CURLOPT_HTTPHEADER, array(134 'User-Agent: EveryPay Internal PHP Library'135 ));136 curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);126 if (!$apiKey) { 127 throw new Exception('api secret key is missing'); 128 } 129 $query = http_build_query($params, '', '&'); 130 $curl = curl_init(); 131 curl_setopt($curl, CURLOPT_TIMEOUT, 30); 132 curl_setopt($curl, CURLOPT_CUSTOMREQUEST, strtoupper($method)); 133 curl_setopt($curl, CURLOPT_HTTPHEADER, array( 134 'User-Agent: EveryPay Internal PHP Library' 135 )); 136 curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); 137 137 138 curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);139 curl_setopt($curl, CURLOPT_USERPWD, $apiKey . ':');138 curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); 139 curl_setopt($curl, CURLOPT_USERPWD, $apiKey . ':'); 140 140 141 if (!empty($params)) {142 $query = http_build_query($params, null, '&');143 if ('get' === strtolower($method)) {144 $url .= (false === strpos($url, '?')) ? '?' : '&';145 $url .= $query;146 } else {147 curl_setopt($curl, CURLOPT_POSTFIELDS, $query);148 }149 }141 if (!empty($params)) { 142 $query = http_build_query($params, '', '&'); 143 if ('get' === strtolower($method)) { 144 $url .= (false === strpos($url, '?')) ? '?' : '&'; 145 $url .= $query; 146 } else { 147 curl_setopt($curl, CURLOPT_POSTFIELDS, $query); 148 } 149 } 150 150 151 curl_setopt($curl, CURLOPT_URL, $url);152 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);153 $result = curl_exec($curl);154 $info = curl_getinfo($curl);151 curl_setopt($curl, CURLOPT_URL, $url); 152 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 153 $result = curl_exec($curl); 154 $info = curl_getinfo($curl); 155 155 156 $response = array();156 $response = array(); 157 157 158 if (curl_errno($curl)) {159 $curlError = curl_error($curl);160 throw new Exception($curlError);161 }158 if (curl_errno($curl)) { 159 $curlError = curl_error($curl); 160 throw new Exception($curlError); 161 } 162 162 163 if (stripos($info['content_type'], 'application/json') === false) {164 throw new Exception('content type is not application/json'. ' '. $query);165 }163 if (stripos($info['content_type'], 'application/json') === false) { 164 throw new Exception('content type is not application/json' . ' ' . $query); 165 } 166 166 167 $response['status'] = $info['http_code'];168 $response['body'] = json_decode($result, true);167 $response['status'] = $info['http_code']; 168 $response['body'] = json_decode($result, true); 169 169 170 if (!isset($response['body']) || empty($response['body'])) {171 throw new Exception('response body is empty. '.$query);172 }170 if (!isset($response['body']) || empty($response['body'])) { 171 throw new Exception('response body is empty. ' . $query); 172 } 173 173 174 if (isset($response['body']['error'])) {175 throw new Exception($response['body']['error']['message']. ' '. $query);176 }174 if (isset($response['body']['error'])) { 175 throw new Exception($response['body']['error']['message'] . ' ' . $query); 176 } 177 177 178 return $response;179 }178 return $response; 179 } 180 180 } -
everypay-payment-gateway/trunk/includes/class-wc-everypay-renderer.php
r2462801 r3145934 19 19 public function render_iframe($amount, $max_installments) 20 20 { 21 global $current_user; 22 $billing_address = get_user_meta( $current_user->ID, 'billing_address_1', true ); 21 $billing_address = WC()->customer->get_billing_address(); 22 $billing_email = WC()->customer->get_billing_email(); 23 $billing_phone = WC()->customer->get_billing_phone(); 24 23 25 $total = $this->helpers->format_amount($amount); 24 26 … … 28 30 'max_installments' => $this->helpers->calculate_installments($total, $max_installments), 29 31 'locale' => $this->locale, 30 'billing_address' => $billing_address 32 'billing_address' => $billing_address, 33 'email' => $billing_email, 34 'phone' => $billing_phone, 31 35 ); 32 36 33 if ( $_POST['tokenized-card']) {37 if (!empty($_POST['tokenized-card'])) { 34 38 $EVDATA['tokenized'] = true; 35 39 } 36 40 37 if ($this->tokenization_status == 'yes' && is_user_logged_in() && !$_POST['tokenized-card']) {41 if ($this->tokenization_status == 'yes' && is_user_logged_in() && empty($_POST['tokenized-card'])) { 38 42 $EVDATA['save_cards'] = true; 39 43 } -
everypay-payment-gateway/trunk/includes/payment-methods/class-wc-everypay-gateway.php
r2518089 r3145934 2 2 3 3 if (!defined('ABSPATH')) 4 exit;4 exit; 5 5 6 6 … … 8 8 { 9 9 10 /**11 * Everypay public key12 * @var string13 */14 private $everypayPublicKey;15 16 /**17 * Everypay secret key18 * @var string19 */20 private $everypaySecretKey;10 /** 11 * Everypay public key 12 * @var string 13 */ 14 private $everypayPublicKey; 15 16 /** 17 * Everypay secret key 18 * @var string 19 */ 20 private $everypaySecretKey; 21 21 22 22 /** … … 34 34 35 35 /** 36 * Everypay helpers36 * Everypay helpers 37 37 * @var object 38 38 */ … … 43 43 * @var object 44 44 */ 45 private $renderer;45 private $renderer; 46 46 47 47 /** … … 51 51 52 52 public function __construct() 53 {54 $this->id = 'everypay';55 $this->icon = apply_filters('woocommerce_everypay_icon', EVERYPAY_IMAGES_URL.'/everypay.png');56 $this->has_fields = true;57 $this->method_title = 'Everypay';58 $this->method_description = 'Everypay is a company that provides a way for individuals and businesses to accept payments over the Internet.';59 $this->init_form_fields();60 $this->init_settings();61 $this->supports = array('products', 'refunds');62 $this->title = esc_html($this->get_option('everypay_title'));63 $this->description = esc_html($this->get_option('description'));64 65 $this->everypayPublicKey = esc_html($this->get_option('everypayPublicKey'));66 $this->everypaySecretKey = esc_html($this->get_option('everypaySecretKey'));67 $this->max_installments = $this->get_option('everypay_maximum_installments');68 $this->tokenization_status = $this->get_option('everypay_tokenization');69 $this->everypay_sandbox = $this->get_option('everypay_sandbox');70 71 $this->helpers = new WC_Everypay_Helpers();72 $this->renderer = new WC_Everypay_Renderer($this->helpers, $this->everypayPublicKey, $this->tokenization_status);73 74 if (!defined("EVERYPAY_SANDBOX")) {75 define( "EVERYPAY_SANDBOX", $this->everypay_sandbox == 'yes');76 }77 78 if (EVERYPAY_SANDBOX) {79 WC_Everypay_Api::setTestMode();80 }81 82 add_filter('woocommerce_available_payment_gateways', array($this, 'disable_everypay_if_keys_not_set'));83 add_filter('query_vars', array($this, 'add_everypay_var'));84 add_action('wp_enqueue_scripts', array($this, 'add_everypay_js'));85 86 87 if (is_admin()) {88 new WC_Everypay_Admin($this->everypayPublicKey, $this->everypaySecretKey);89 add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));90 }91 92 } 93 94 95 private function create_payload($wc_order, $token) 96 { 97 $amount = $this->helpers->format_amount($wc_order->order_total);98 $billing_email = $wc_order->billing_email;99 $billing_phone = $wc_order->billing_phone; 100 $description = get_bloginfo('name') . ' /'101 . 'Order' . ' #' . $wc_order->get_order_number() . ' - '102 . number_format($amount/100, 2, ',', '.') . '€'; 103 104 if (!$billing_email || !$billing_phone || !$description || !$token) {105 throw new Exception('create_payload: invalid variable');106 } 107 $installments = $this->helpers->calculate_installments( 108 $amount, 109 $this->max_installments 110 ); 111 return array(112 'description' => $description,113 'amount' => $amount,114 'payee_email' => $billing_email,115 'payee_phone' => $billing_phone,116 'token' => $token,117 'max_installments' => $installments,118 );119 }120 121 /*53 { 54 $this->id = 'everypay'; 55 $this->icon = apply_filters('woocommerce_everypay_icon', EVERYPAY_IMAGES_URL . '/everypay.png'); 56 $this->has_fields = true; 57 $this->method_title = 'Everypay'; 58 $this->method_description = 'Everypay is a company that provides a way for individuals and businesses to accept payments over the Internet.'; 59 $this->init_form_fields(); 60 $this->init_settings(); 61 $this->supports = array('products', 'refunds'); 62 $this->title = esc_html($this->get_option('everypay_title')); 63 $this->description = esc_html($this->get_option('description')); 64 65 $this->everypayPublicKey = esc_html($this->get_option('everypayPublicKey')); 66 $this->everypaySecretKey = esc_html($this->get_option('everypaySecretKey')); 67 $this->max_installments = $this->get_option('everypay_maximum_installments'); 68 $this->tokenization_status = $this->get_option('everypay_tokenization'); 69 $this->everypay_sandbox = $this->get_option('everypay_sandbox'); 70 71 $this->helpers = new WC_Everypay_Helpers(); 72 $this->renderer = new WC_Everypay_Renderer($this->helpers, $this->everypayPublicKey, $this->tokenization_status); 73 74 if (!defined("EVERYPAY_SANDBOX")) { 75 define("EVERYPAY_SANDBOX", $this->everypay_sandbox == 'yes'); 76 } 77 78 if (EVERYPAY_SANDBOX) { 79 WC_Everypay_Api::setTestMode(); 80 } 81 82 add_filter('woocommerce_available_payment_gateways', array($this, 'disable_everypay_if_keys_not_set')); 83 add_filter('query_vars', array($this, 'add_everypay_var')); 84 add_action('wp_enqueue_scripts', array($this, 'add_everypay_js')); 85 86 87 if (is_admin()) { 88 new WC_Everypay_Admin($this->everypayPublicKey, $this->everypaySecretKey); 89 add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options')); 90 } 91 } 92 93 94 private function create_payload($wc_order, $token) 95 { 96 $amount = $this->helpers->format_amount($wc_order->get_total()); 97 $billing_email = $wc_order->get_billing_email(); 98 $billing_phone = $wc_order->get_billing_phone(); 99 $description = get_bloginfo('name') . ' / ' 100 . 'Order' . ' #' . $wc_order->get_order_number() . ' - ' 101 . number_format($amount / 100, 2, ',', '.') . '€'; 102 103 if (!$billing_email || !$billing_phone || !$description || !$token) { 104 throw new Exception('create_payload: invalid variable'); 105 } 106 $installments = $this->helpers->calculate_installments( 107 $amount, 108 $this->max_installments 109 ); 110 111 return array( 112 'description' => $description, 113 'amount' => $amount, 114 'payee_email' => $billing_email, 115 'payee_phone' => $billing_phone, 116 'token' => $token, 117 'max_installments' => $installments, 118 ); 119 } 120 121 /* 122 122 * Process the payment 123 123 * … … 136 136 } 137 137 if (!isset($_POST['everypayToken']) || empty($_POST['everypayToken'])) { 138 $this->renderer->render_iframe(WC()->cart->total , $this->max_installments);138 $this->renderer->render_iframe(WC()->cart->total, $this->max_installments); 139 139 exit; 140 140 } … … 145 145 $payload = $this->create_payload($wc_order, $token); 146 146 147 if (is_user_logged_in() && (isset($_POST['everypay_save_card']) || isset($_POST['tokenized-card']) ) && $this->tokenization_status == 'yes') {148 (new WC_Everypay_Repository())->save_logs('tokenization_payment', implode(" ", $payload));147 if (is_user_logged_in() && (isset($_POST['everypay_save_card']) || isset($_POST['tokenized-card'])) && $this->tokenization_status == 'yes') { 148 (new WC_Everypay_Repository())->save_logs('tokenization_payment', implode(" ", $payload)); 149 149 $user_id = $wc_order->get_user_id(); 150 150 $everypay_tokenization = new WC_Everypay_Tokenization(); 151 $ everypay_tokenization->process_tokenized_payment($user_id, $payload);151 $response = $everypay_tokenization->process_tokenized_payment($user_id, $payload); 152 152 } else { 153 (new WC_Everypay_Repository())->save_logs('payment', implode(" ", $payload));154 WC_Everypay_Api::addPayment($payload);153 (new WC_Everypay_Repository())->save_logs('payment', implode(" ", $payload)); 154 $response = WC_Everypay_Api::addPayment($payload); 155 155 } 156 return $this->complete_order($wc_order); 157 156 return $this->complete_order($wc_order, $response['body']['token']); 158 157 } catch (Exception $e) { 159 158 … … 161 160 wc_add_notice(esc_html($error), 'error'); 162 161 $response_data = array( 163 'result' => 'failure',164 'reload' => true,165 'refresh' => true162 'result' => 'failure', 163 'reload' => true, 164 'refresh' => true 166 165 ); 167 166 echo json_encode($response_data); 168 167 if ($order_id) { 169 wp_delete_post($order_id, true);168 wp_delete_post($order_id, true); 170 169 } 171 170 (new WC_Everypay_Repository())->save_logs('error', $e->getMessage()); 172 171 exit; 173 172 } 174 175 } 176 177 private function complete_order($wc_order) 178 { 179 $dt = new DateTime("Now"); 180 $timestamp = $dt->format('Y-m-d H:i:s e'); 181 182 $wc_order->add_order_note('Everypay payment completed at-' .$timestamp); 183 $wc_order->payment_complete(); 184 $wc_order->get_order(); 185 WC()->cart->empty_cart(); 186 187 return array( 188 'result' => 'success', 189 'redirect' => $this->get_return_url($wc_order) 190 ); 191 192 } 173 } 174 175 private function complete_order($wc_order, $token) 176 { 177 $dt = new DateTime("Now"); 178 $timestamp = $dt->format('Y-m-d H:i:s e'); 179 180 $wc_order->add_order_note('Everypay payment completed at-' . $timestamp); 181 $wc_order->update_meta_data('everypay_payment_token', $token); 182 $wc_order->payment_complete(); 183 $wc_order->get_order(); 184 WC()->cart->empty_cart(); 185 186 return array( 187 'result' => 'success', 188 'redirect' => $this->get_return_url($wc_order) 189 ); 190 } 193 191 194 192 public function payment_fields() … … 200 198 } 201 199 $repository = new WC_Everypay_Repository(); 202 $user_id = get_current_user_id();203 $customer_cards = $repository->get_customer_cards($user_id);204 205 wp_enqueue_script('tokenization_js', EVERYPAY_JS_URL .'tokenization.js', array('jquery'), false, true);200 $user_id = get_current_user_id(); 201 $customer_cards = $repository->get_customer_cards($user_id); 202 203 wp_enqueue_script('tokenization_js', EVERYPAY_JS_URL . 'tokenization.js', array('jquery'), false, true); 206 204 207 205 echo '<div>'; 208 206 if (!empty($customer_cards)) { 209 $this->renderer->render_cards($customer_cards);210 }207 $this->renderer->render_cards($customer_cards); 208 } 211 209 echo '</div>'; 212 213 } 214 215 216 /** 217 * Refund 218 * 219 * @param type $order_id 220 * @param type $amount 221 * @param type $reason 222 * @return boolean 223 */ 224 public function process_refund($order_id, $amount = NULL, $reason = '') 225 { 226 if (!$amount) { 227 return false; 228 } 229 230 try { 231 $params = array( 232 'amount' => preg_replace("/[^0-9]/", '', number_format($amount, 2)), 233 'description' => $reason 234 ); 235 236 $token = get_post_meta( (int) $order_id, 'token', true); 237 238 WC_Everypay_Api::setApiKey($this->everypaySecretKey); 239 $refund = WC_Everypay_Api::refundPayment($token, $params); 240 241 $dt = new DateTime("Now"); 242 $timestamp = $dt->format('Y-m-d H:i:s e'); 243 $refToken = $refund['body']['token']; 244 245 $wc_order = new WC_Order($order_id); 246 $wc_order->add_order_note('Everypay Refund completed at-' . $timestamp . '-with Refund Token=' . $refToken); 247 248 return true; 249 250 } catch (\Exception $e) { 251 return false; 252 } 253 } 210 } 211 212 213 /** 214 * Refund 215 * 216 * @param type $order_id 217 * @param type $amount 218 * @param type $reason 219 * @return boolean 220 */ 221 public function process_refund($order_id, $amount = NULL, $reason = '') 222 { 223 if (!$amount) { 224 return false; 225 } 226 227 try { 228 $params = array( 229 'amount' => preg_replace("/[^0-9]/", '', number_format($amount, 2)), 230 'description' => $reason 231 ); 232 233 $wc_order = new WC_Order($order_id); 234 $token = $wc_order->get_meta('everypay_payment_token'); 235 236 WC_Everypay_Api::setApiKey($this->everypaySecretKey); 237 $refund = WC_Everypay_Api::refundPayment($token, $params); 238 239 $dt = new DateTime("Now"); 240 $timestamp = $dt->format('Y-m-d H:i:s e'); 241 $refToken = $refund['body']['token']; 242 243 $wc_order->add_order_note('Everypay Refund completed at-' . $timestamp . '-with Refund Token=' . $refToken); 244 245 return true; 246 } catch (\Exception $e) { 247 return false; 248 } 249 } 254 250 255 251 /** … … 263 259 } 264 260 265 wp_register_style( 'everypay_styles', EVERYPAY_CSS_URL.'everypay_styles.css');266 wp_enqueue_style( 'everypay_styles');267 268 wp_register_style( 'everypay_modal', EVERYPAY_CSS_URL.'everypay_modal.css');269 wp_enqueue_style( 'everypay_modal');261 wp_register_style('everypay_styles', EVERYPAY_CSS_URL . 'everypay_styles.css'); 262 wp_enqueue_style('everypay_styles'); 263 264 wp_register_style('everypay_modal', EVERYPAY_CSS_URL . 'everypay_modal.css'); 265 wp_enqueue_style('everypay_modal'); 270 266 271 267 if (EVERYPAY_SANDBOX) { … … 277 273 wp_enqueue_script('everypay_script'); 278 274 279 wp_register_script('everypay_helpers', EVERYPAY_JS_URL .'helpers.js');275 wp_register_script('everypay_helpers', EVERYPAY_JS_URL . 'helpers.js'); 280 276 wp_enqueue_script('everypay_helpers'); 281 277 282 wp_register_script('everypay_modal', EVERYPAY_JS_URL .'everypay_modal.js', array(), false, true);278 wp_register_script('everypay_modal', EVERYPAY_JS_URL . 'everypay_modal.js', array(), false, true); 283 279 wp_enqueue_script('everypay_modal'); 284 280 285 wp_register_script('everypay', EVERYPAY_JS_URL .'everypay.js', array(), false, true);281 wp_register_script('everypay', EVERYPAY_JS_URL . 'everypay.js', array(), false, true); 286 282 wp_enqueue_script('everypay'); 287 283 } … … 291 287 $error = 'An error occurred. Please try again.'; 292 288 wc_add_notice($error, $notice_type = 'error'); 293 (new WC_Everypay_Repository())->save_logs('error', $errorMessage);289 (new WC_Everypay_Repository())->save_logs('error', $errorMessage); 294 290 } 295 291 … … 300 296 public function init_form_fields() 301 297 { 302 $this->form_fields = require plugin_dir_path(__FILE__) . '../admin/wc-admin-form-fields.php';298 $this->form_fields = require plugin_dir_path(__FILE__) . '../admin/wc-admin-form-fields.php'; 303 299 } 304 300 … … 306 302 public function admin_options() 307 303 { 308 ?>309 <table class="form-table">304 ?> 305 <table class="form-table"> 310 306 <?php $this->generate_settings_html(); ?> 311 <tr valign="top">312 <th scope="row" class="titledesc" style="padding-top:0"> </th>313 <td class="forminp" id="everypay-max_installments-table" style="padding-top:0">314 <div id="installments"></div>315 <div id="installment-table" style="display:none">316 <table class="widefat wc_input_table table" cellspacing="0">317 <thead>318 <tr>319 <th>Από (Ποσό σε €)</th>320 <th>Eως (Ποσό σε €)</th>321 <th>Μέγιστος Αρ. Δόσεων</th>322 <th>323 <a class="button-primary" href="#" id="add-installment" style="width:101px;">324 <i class="icon icon-plus-sign"></i> <span class="ab-icon"></span> Προσθήκη325 </a>326 </th>327 </tr>328 </thead>329 <tbody>330 </tbody>331 </table>332 </div>333 </td>334 </tr>335 </table>336 <?php307 <tr valign="top"> 308 <th scope="row" class="titledesc" style="padding-top:0"> </th> 309 <td class="forminp" id="everypay-max_installments-table" style="padding-top:0"> 310 <div id="installments"></div> 311 <div id="installment-table" style="display:none"> 312 <table class="widefat wc_input_table table" cellspacing="0"> 313 <thead> 314 <tr> 315 <th>Από (Ποσό σε €)</th> 316 <th>Eως (Ποσό σε €)</th> 317 <th>Μέγιστος Αρ. Δόσεων</th> 318 <th> 319 <a class="button-primary" href="#" id="add-installment" style="width:101px;"> 320 <i class="icon icon-plus-sign"></i> <span class="ab-icon"></span> Προσθήκη 321 </a> 322 </th> 323 </tr> 324 </thead> 325 <tbody> 326 </tbody> 327 </table> 328 </div> 329 </td> 330 </tr> 331 </table> 332 <?php 337 333 } 338 334 … … 342 338 * @return array 343 339 */ 344 public function add_everypay_var($vars) { 340 public function add_everypay_var($vars) 341 { 345 342 $vars[] = "everypayToken"; 346 343 return $vars; … … 362 359 return $available_gateways; 363 360 } 364 365 361 }
Note: See TracChangeset
for help on using the changeset viewer.