Changeset 3014084
- Timestamp:
- 12/25/2023 02:08:47 PM (2 years ago)
- Location:
- allpay-payment-gateway/trunk
- Files:
-
- 4 edited
-
allpay-gateway.php (modified) (1 diff)
-
allpay.php (modified) (4 diffs)
-
readme.txt (modified) (5 diffs)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
allpay-payment-gateway/trunk/allpay-gateway.php
r2951701 r3014084 2 2 /** 3 3 * Plugin Name: Allpay payment gateway 4 * Plugin URI: https://www.allpay.co.il/integrations/wo rdpress5 * Description: Allpay Payment Gateway for Wo rdpress WooCommerce.4 * Plugin URI: https://www.allpay.co.il/integrations/woocommerce 5 * Description: Allpay Payment Gateway for WooCommerce. 6 6 * Author: Allpay 7 7 * Author URI: https://allpay.co.il 8 * Version: 1.0. 38 * Version: 1.0.4 9 9 * Text Domain: allpay-payment-gateway 10 10 * Domain Path: /languages 11 * Tested up to: 6. 312 * WC tested up to: 8. 0.111 * Tested up to: 6.4 12 * WC tested up to: 8.4.0 13 13 * WC requires at least: 3.0 14 14 * -
allpay-payment-gateway/trunk/allpay.php
r2948164 r3014084 39 39 public function webhook() { 40 40 $chunks = []; 41 $chunks["status"] = (int)$_REQUEST['status']; 42 if(isset($_REQUEST['amount'])) { 43 $chunks["amount"] = sanitize_text_field($_REQUEST['amount']); 44 } 45 if(isset($_REQUEST['order_id'])) { 46 $chunks["order_id"] = sanitize_text_field($_REQUEST['order_id']); 47 } 48 if(isset($_REQUEST['currency'])) { 49 $chunks["currency"] = sanitize_text_field($_REQUEST['currency']); 50 } 51 if(isset($_REQUEST['add_field_1'])) { 52 $chunks["add_field_1"] = sanitize_text_field($_REQUEST['add_field_1']); 53 } 54 if(isset($_REQUEST['add_field_2'])) { 55 $chunks["add_field_2"] = sanitize_text_field($_REQUEST['add_field_2']); 56 } 41 $wh_params = ['amount', 'order_id', 'currency', 'status', 'card_mask', 'card_brand', 'foreign_card', 'add_field_1', 'add_field_2']; 42 foreach($wh_params as $k) { 43 if(isset($_POST[$k])) { 44 $chunks[$k] = sanitize_text_field($_POST[$k]); 45 } 46 } 57 47 $sign = $this->get_signature($chunks); 58 48 $order_id = (int)$_REQUEST['order_id']; … … 126 116 $customer_order = new WC_Order( $order_id ); 127 117 128 $environment_url = 'https://allpay.to/app/?show=getpayment&mode=api1'; 118 $environment_url = 'https://allpay.to/app/?show=getpayment&mode=api2'; 119 120 $first_name = $customer_order->get_shipping_first_name(); 121 $last_name = $customer_order->get_shipping_last_name(); 122 if (empty($first_name) || empty($last_name)) { 123 $first_name = $customer_order->get_billing_first_name(); 124 $last_name = $customer_order->get_billing_last_name(); 125 } 126 $full_name = trim($first_name . ' ' . $last_name); 129 127 130 128 $request = array( … … 132 130 "amount" => $customer_order->order_total, 133 131 "currency" => get_woocommerce_currency(), 132 "lang" => $this->get_lang(), 134 133 "order_id" => str_replace( "#", "", $customer_order->get_order_number() ), 135 "client_name" => $ customer_order->billing_first_name . ' ' . $customer_order->billing_last_name,134 "client_name" => $full_name, 136 135 "client_phone" => $customer_order->billing_phone, 137 136 "client_email" => $customer_order->billing_email, 138 137 "notifications_url" => get_home_url() . '/?wc-api=allpay', 139 138 "success_url" => $customer_order->get_checkout_order_received_url(), 140 " error_url" => $customer_order->get_checkout_order_received_url(),139 "backlink_url" => home_url() 141 140 ); 142 141 … … 203 202 } 204 203 204 public function get_lang() { 205 $langs = [ 206 'en' => 'ENG', 207 'ru' => 'RUS', 208 'he' => 'HEB' 209 ]; 210 $lng = 'en'; 211 if ( defined('ICL_LANGUAGE_CODE') ) { 212 $lng = ICL_LANGUAGE_CODE; 213 } elseif ( function_exists('pll_current_language') ) { 214 $lng = pll_current_language(); 215 } else { 216 $locale = get_locale(); 217 $locale_parts = explode('_', $locale); 218 $lng = strtolower($locale_parts[0]); 219 } 220 if(isset($langs[$lng])) { 221 return $langs[$lng]; 222 } 223 return 'ENG'; 224 } 225 205 226 } -
allpay-payment-gateway/trunk/readme.txt
r2951701 r3014084 1 1 === Allpay Payment Gateway === 2 2 Contributors: Allpay 3 Tags: payment provider, Israel, платежная система, Израиль 3 Tags: payment provider, Israel, платежная система, Израиль, Allpay 4 4 Requires PHP: 5.6 5 5 Requires at least: 4.7 6 Tested up to: 6. 37 Stable tag: 1.0. 36 Tested up to: 6.4 7 Stable tag: 1.0.4 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 12 12 13 13 == Description == 14 The plugin allows you to accept payments online from all over the world (except for the Russian Federation) with crediting to a bank account in Israel. Cards of major brands are supported: Visa, Mastercard, American Express, Diners, and Apple Pay.14 The plugin allows you to accept payments online from all over the world (except for the Russian Federation) with crediting to a bank account in Israel. Cards of major brands are supported: Visa, Mastercard, American Express, Diners, Discover and JCB. 15 15 16 16 It supports installments and digital invoices. … … 23 23 24 24 ### Security 25 Payments made via asecure channel and are safe for the client, as well as transparent and legal for your business.25 Payments made via secure channel and are safe for the client, as well as transparent and legal for your business. 26 26 27 27 ### Features 28 28 1. Low commission. 29 29 2. Support by e-mail, Telegram and WhatsApp in English, Russian and Hebrew. 30 3. Cards Visa, Mastercard, American Express, Diners, Isracard .30 3. Cards Visa, Mastercard, American Express, Diners, Isracard, JCB. 31 31 4. Payments from all over the world (except for the Russian Federation). 32 32 5. Installments. … … 34 34 7. Automatic currency converter. 35 35 8. Mobile application for Android and iPhone. 36 9. Payments pages languages: English, Hebrew and Russian. 36 37 37 38 == Screenshots == … … 56 57 57 58 = How frequent are funds credited to the bank account? = 58 Every 9th day of month.59 Every 15th day of month. 59 60 60 61 == Changelog == 62 = 1.0.4 - MONDAY, 25TH DECEMBER 2023 = 63 * New: Added payment page language support for ENG, HEB and RUS 64 * Fix: Payment error for logged in users on some WP versions 65 * Improvement: Aligned with new Allpay payment page 66 61 67 = 1.0.2 - THURSDAY, 10TH AUGUST 2023 = 62 68 * Improvement: Tested with Wordpress v6.3 -
allpay-payment-gateway/trunk/uninstall.php
r2948164 r3014084 15 15 * 16 16 * 17 * @since 1.0. 217 * @since 1.0.3 18 18 * 19 19 * @package allpay-payment-gateway
Note: See TracChangeset
for help on using the changeset viewer.