Changeset 3198819
- Timestamp:
- 11/28/2024 11:49:03 AM (16 months ago)
- Location:
- cashfree
- Files:
-
- 30 added
- 8 edited
-
tags/4.7.5 (added)
-
tags/4.7.5/LICENSE (added)
-
tags/4.7.5/README.md (added)
-
tags/4.7.5/assets (added)
-
tags/4.7.5/assets/js (added)
-
tags/4.7.5/assets/js/checkout.js (added)
-
tags/4.7.5/assets/js/index.js (added)
-
tags/4.7.5/cashfree.php (added)
-
tags/4.7.5/dist (added)
-
tags/4.7.5/dist/main.js (added)
-
tags/4.7.5/includes (added)
-
tags/4.7.5/includes/class-wc-cashfree-api.php (added)
-
tags/4.7.5/includes/gateways (added)
-
tags/4.7.5/includes/gateways/class-wc-cashfree-block-support.php (added)
-
tags/4.7.5/includes/gateways/class-wc-cashfree-gateway.php (added)
-
tags/4.7.5/includes/gateways/class-wc-cashfree-payments.php (added)
-
tags/4.7.5/includes/http (added)
-
tags/4.7.5/includes/http/class-wc-cashfree-adapter.php (added)
-
tags/4.7.5/includes/request (added)
-
tags/4.7.5/includes/request/class-wc-cashfree-request-billing.php (added)
-
tags/4.7.5/includes/request/class-wc-cashfree-request-checkout.php (added)
-
tags/4.7.5/includes/request/class-wc-cashfree-request-items.php (added)
-
tags/4.7.5/includes/request/class-wc-cashfree-request-shipping.php (added)
-
tags/4.7.5/includes/settings (added)
-
tags/4.7.5/includes/settings/cashfree-payments.php (added)
-
tags/4.7.5/includes/wc-cashfree-functions.php (added)
-
tags/4.7.5/includes/wc-cashfree-scripts.php (added)
-
tags/4.7.5/readme.txt (added)
-
tags/4.7.5/templates (added)
-
tags/4.7.5/templates/payment-fields.php (added)
-
trunk/cashfree.php (modified) (3 diffs)
-
trunk/includes/class-wc-cashfree-api.php (modified) (1 diff)
-
trunk/includes/gateways/class-wc-cashfree-block-support.php (modified) (1 diff)
-
trunk/includes/gateways/class-wc-cashfree-gateway.php (modified) (1 diff)
-
trunk/includes/http/class-wc-cashfree-adapter.php (modified) (2 diffs)
-
trunk/includes/request/class-wc-cashfree-request-checkout.php (modified) (2 diffs)
-
trunk/includes/request/class-wc-cashfree-request-items.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cashfree/trunk/cashfree.php
r3112122 r3198819 2 2 /** 3 3 * Plugin Name: Cashfree 4 * Version: 4.7. 24 * Version: 4.7.5 5 5 * Plugin URI: https://github.com/cashfree/cashfree-woocommerce 6 6 * Description: Payment gateway plugin by Cashfree Payments for Woocommerce sites. … … 12 12 * Domain Path: /languages 13 13 * Requires at least: 4.4 14 * Tested up to: 6. 514 * Tested up to: 6.7 15 15 * WC requires at least: 3.0 16 * WC tested up to: 8.816 * WC tested up to: 9.4 17 17 * 18 18 * … … 51 51 */ 52 52 private $settings; 53 54 private $enabled; 53 55 54 56 /** -
cashfree/trunk/includes/class-wc-cashfree-api.php
r2742179 r3198819 16 16 * @param string $id Api identifier. 17 17 */ 18 private $id; 19 18 20 public function __construct( $id ) { 19 21 $this->id = $id; -
cashfree/trunk/includes/gateways/class-wc-cashfree-block-support.php
r3038899 r3198819 8 8 9 9 protected $name = 'cashfree'; 10 protected $settings = []; 11 protected $gateway; 10 12 11 13 /** -
cashfree/trunk/includes/gateways/class-wc-cashfree-gateway.php
r3101786 r3198819 13 13 abstract class WC_Cashfree_Gateway extends WC_Payment_Gateway { 14 14 15 /** 16 * Cashfree adapter instance. 17 * 18 * @var WC_Cashfree_Adapter 19 */ 20 21 protected $adapter; 15 /** 16 * Cashfree adapter instance. 17 * 18 * @var WC_Cashfree_Adapter 19 */ 20 protected $adapter; 21 22 /** 23 * Sandbox mode enabled. 24 * 25 * @var bool 26 */ 27 protected $sandbox; 28 29 /** 30 * Debug mode enabled. 31 * 32 * @var bool 33 */ 34 protected $debug; 35 36 /** 37 * Token parameter name. 38 * 39 * @var string 40 */ 41 protected $token_param; 42 43 /** 44 * Order ID prefix enabled. 45 * 46 * @var bool 47 */ 48 protected $order_id_prefix_text; 49 50 /** 51 * Order in context enabled. 52 * 53 * @var bool 54 */ 55 protected $order_in_context; 22 56 23 57 /** -
cashfree/trunk/includes/http/class-wc-cashfree-adapter.php
r3112122 r3198819 163 163 $getEnvValue = $this->getCurlValue(); 164 164 $cartData = array( 165 'refund_amount' => $amount,165 'refund_amount' => (float) str_replace(',', '', $amount), 166 166 'refund_id' => $refund_id, 167 167 'refund_note' => $description, … … 219 219 $http_code = wp_remote_retrieve_response_code( $response ); 220 220 $body = json_decode(wp_remote_retrieve_body( $response )); 221 222 221 if($http_code === 200) { 223 222 return $body; -
cashfree/trunk/includes/request/class-wc-cashfree-request-checkout.php
r3101786 r3198819 52 52 ), 53 53 'order_id' => (string) $cf_order_id, 54 'order_amount' => $order->get_total(),54 'order_amount' => self::cfConvertToNumber($order->get_total()), 55 55 'order_currency' => $order->get_currency(), 56 56 'order_note' => 'WooCommerce', … … 178 178 return $customerPhone; 179 179 } 180 181 public static function cfConvertToNumber($input) { 182 return (float) str_replace(',', '', $input); 183 } 180 184 } -
cashfree/trunk/includes/request/class-wc-cashfree-request-items.php
r3108628 r3198819 20 20 */ 21 21 public static function build( $order, $item ) { 22 require_once WC_CASHFREE_DIR_PATH . 'includes/request/class-wc-cashfree-request-checkout.php'; 22 23 $product = $item->get_product(); 23 24 24 return array( 25 25 'item_id' => substr( $item->get_variation_id() ? $item->get_variation_id() : $item->get_product_id(), 0, 254 ), … … 29 29 'item_details_url' => get_permalink( $item->get_product_id() ), 30 30 'item_image_url' => (string) wp_get_attachment_image_url( $product->get_image_id(), 'full' ), 31 'item_original_unit_price' => $product->get_regular_price() ? $product->get_regular_price() : 0,32 'item_discounted_unit_price'=> $product->get_price() ? $product->get_price() : 0,31 'item_original_unit_price' => self::cfConvertToNumber($product->get_regular_price() ? $product->get_regular_price() : 0), 32 'item_discounted_unit_price'=> self::cfConvertToNumber($product->get_price() ? $product->get_price() : 0), 33 33 'item_quantity' => $item->get_quantity(), 34 34 'item_currency' => $order->get_currency() 35 35 ); 36 36 } 37 38 public static function cfConvertToNumber($input) { 39 return (float) str_replace(',', '', $input); 40 } 37 41 } -
cashfree/trunk/readme.txt
r3112122 r3198819 4 4 Tested up to: 6.5 5 5 Requires PHP: 5.6 6 Stable tag: 4.7. 27 Version: 4.7. 26 Stable tag: 4.7.5 7 Version: 4.7.5 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 50 50 51 51 == Changelog == 52 53 = 4.7.4 = 54 * Bug Fix: Order amount correction 55 56 = 4.7.3 = 57 * Deprecated Property Fix: Updated the cashfree classes to prevent deprecated warnings in PHP 8.2 and later by explicitly declaring properties instead of using dynamic properties. 52 58 53 59 = 4.7.2 =
Note: See TracChangeset
for help on using the changeset viewer.