Changeset 3027434
- Timestamp:
- 01/26/2024 05:05:54 PM (2 years ago)
- Location:
- rave-woocommerce-payment-gateway
- Files:
-
- 22 edited
- 1 copied
-
tags/2.3.5 (copied) (copied from rave-woocommerce-payment-gateway/trunk)
-
tags/2.3.5/build/index.asset.php (modified) (1 diff)
-
tags/2.3.5/build/index.js (modified) (1 diff)
-
tags/2.3.5/changelog.txt (modified) (1 diff)
-
tags/2.3.5/client/blocks/payment-method/index.js (modified) (1 diff)
-
tags/2.3.5/i18n/languages/rave-woocommerce-payment-gateway.pot (modified) (5 diffs)
-
tags/2.3.5/includes/blocks/class-flutterwave-wc-gateway-blocks-support.php (modified) (3 diffs)
-
tags/2.3.5/includes/class-flutterwave.php (modified) (2 diffs)
-
tags/2.3.5/includes/class-flw-wc-payment-gateway.php (modified) (2 diffs)
-
tags/2.3.5/includes/notices/class-flw-wc-payment-gateway-notices.php (modified) (1 diff)
-
tags/2.3.5/rave-woocommerce-payment-gateway.php (modified) (3 diffs)
-
tags/2.3.5/readme.txt (modified) (2 diffs)
-
trunk/build/index.asset.php (modified) (1 diff)
-
trunk/build/index.js (modified) (1 diff)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/client/blocks/payment-method/index.js (modified) (1 diff)
-
trunk/i18n/languages/rave-woocommerce-payment-gateway.pot (modified) (5 diffs)
-
trunk/includes/blocks/class-flutterwave-wc-gateway-blocks-support.php (modified) (3 diffs)
-
trunk/includes/class-flutterwave.php (modified) (2 diffs)
-
trunk/includes/class-flw-wc-payment-gateway.php (modified) (2 diffs)
-
trunk/includes/notices/class-flw-wc-payment-gateway-notices.php (modified) (1 diff)
-
trunk/rave-woocommerce-payment-gateway.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rave-woocommerce-payment-gateway/tags/2.3.5/build/index.asset.php
r2916059 r3027434 1 <?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => ' 210eaa3553bf368b8de6');1 <?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'ca7ef9ebd15e4df41ad9'); -
rave-woocommerce-payment-gateway/tags/2.3.5/build/index.js
r2916059 r3027434 1 (()=>{"use strict";const e=window.wc.wcBlocksRegistry,t=window.wp.element,a=window.wp.i18n, l=window.wp.htmlEntities,n="rave",r=window.wc.wcSettings,o=()=>{const e=(0,r.getSetting)("rave_data",null);if(!e)throw new Error("Flutterwave initialization data is not available");return e};var i,c;const w=()=>(0,t.createElement)("div",null,(0,l.decodeEntities)(o()?.description||(0,a.__)("You may be redirected to a secure page to complete your payment.","rave-woocommerce-payment-gateway"))),m=null!==(i=o()?.asset_url)&&void 0!==i?i:null,d={name:n,label:(0,t.createElement)("div",{style:{display:"flex",flexDirection:"row",rowGap:".5em"}},(0,t.createElement)("img",{src:`${m}/img/flutterwave-full.svg`,alt:(0,l.decodeEntities)(o()?.title||(0,a.__)("Flutterwave","rave-woocommerce-payment-gateway"))}),(0,t.createElement)("b",null,(0,t.createElement)("h4",null,"Flutterwave"))),placeOrderButtonLabel:(0,a.__)("Proceed to Flutterwave","rave-woocommerce-payment-gateway"),ariaLabel:(0,l.decodeEntities)(o()?.title||(0,a.__)("Payment via Flutterwave","rave-woocommerce-payment-gateway")),canMakePayment:()=>!0,content:(0,t.createElement)(w,null),edit:(0,t.createElement)(w,null),paymentMethodId:n,supports:{features:null!==(c=o()?.supports)&&void 0!==c?c:[]}};(0,e.registerPaymentMethod)(d)})();1 (()=>{"use strict";const e=window.wc.wcBlocksRegistry,t=window.wp.element,a=window.wp.i18n,n=window.wp.htmlEntities,l="rave",r=window.wc.wcSettings,o=()=>{const e=(0,r.getSetting)("rave_data",null);if(!e)throw new Error("Flutterwave initialization data is not available");return e};var i,c;const w=()=>(0,t.createElement)("div",null,(0,n.decodeEntities)(o()?.description||(0,a.__)("You may be redirected to a secure page to complete your payment.","rave-woocommerce-payment-gateway"))),m=null!==(i=o()?.asset_url)&&void 0!==i?i:null,s={name:l,label:(0,t.createElement)("div",{style:{display:"flex",flexDirection:"row",rowGap:".5em",alignItems:"center"}},(0,t.createElement)("img",{src:`${m}/img/flutterwave-full.svg`,alt:(0,n.decodeEntities)(o()?.title||(0,a.__)("Flutterwave","rave-woocommerce-payment-gateway"))}),(0,t.createElement)("b",null,(0,t.createElement)("h4",null,"Flutterwave"))),placeOrderButtonLabel:(0,a.__)("Proceed to Flutterwave","rave-woocommerce-payment-gateway"),ariaLabel:(0,n.decodeEntities)(o()?.title||(0,a.__)("Payment via Flutterwave","rave-woocommerce-payment-gateway")),canMakePayment:()=>!0,content:(0,t.createElement)(w,null),edit:(0,t.createElement)(w,null),paymentMethodId:l,supports:{features:null!==(c=o()?.supports)&&void 0!==c?c:[]}};(0,e.registerPaymentMethod)(s)})(); -
rave-woocommerce-payment-gateway/tags/2.3.5/changelog.txt
r2988222 r3027434 1 1 == Changelog == 2 = 2.3.5 = 3 * Added: Support for WooCommerce HPOS. 4 * Fixed: WooCommerce Blocks Compatibility Issues with WooCommerce 7.0 to 6.9.1. 5 * Fixed: Payment Option alignment on WooCommerce Checkout Block. 2 6 = 2.3.4 = 3 7 * Fix: Webhook Handler Acknowledgement. -
rave-woocommerce-payment-gateway/tags/2.3.5/client/blocks/payment-method/index.js
r2916059 r3027434 26 26 name: PAYMENT_METHOD_NAME, 27 27 label: ( 28 <div style={{ display: 'flex', flexDirection: 'row', rowGap: '.5em' }}>28 <div style={{ display: 'flex', flexDirection: 'row', rowGap: '.5em', alignItems: 'center'}}> 29 29 <img 30 30 src={ `${ FLW_ASSETS }/img/flutterwave-full.svg` } -
rave-woocommerce-payment-gateway/tags/2.3.5/i18n/languages/rave-woocommerce-payment-gateway.pot
r2988222 r3027434 1 # Copyright (C) 202 3Flutterwave Developers1 # Copyright (C) 2024 Flutterwave Developers 2 2 # This file is distributed under the MIT License. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Flutterwave WooCommerce 2.3. 4\n"5 "Project-Id-Version: Flutterwave WooCommerce 2.3.5\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/rave-woocommerce-payment-gateway\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-11-02T20:18:51+00:00\n"12 "POT-Creation-Date: 2024-01-26T17:05:41+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.9.0\n" … … 38 38 msgstr "" 39 39 40 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 3740 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:156 41 41 msgid "Visa" 42 42 msgstr "" 43 43 44 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 4144 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:160 45 45 msgid "American Express" 46 46 msgstr "" 47 47 48 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 4548 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:164 49 49 msgid "Mastercard" 50 50 msgstr "" 51 51 52 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 5252 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:171 53 53 msgctxt "Name of credit card" 54 54 msgid "Discover" 55 55 msgstr "" 56 56 57 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 5657 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:175 58 58 msgid "JCB" 59 59 msgstr "" 60 60 61 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 6061 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:179 62 62 msgid "Diners" 63 63 msgstr "" … … 332 332 333 333 #. translators: %s: url 334 #: includes/class-flw-wc-payment-gateway.php:45 2334 #: includes/class-flw-wc-payment-gateway.php:453 335 335 msgid "Flutterwave is enabled, but the API keys are not set. Please <a href=\"%s\">set your Flutterwave API keys</a> to be able to accept payments." 336 336 msgstr "" 337 337 338 338 #. translators: %s: shop cart url 339 #: includes/class-flw-wc-payment-gateway.php:4 89339 #: includes/class-flw-wc-payment-gateway.php:490 340 340 msgid "Sorry, your session has expired. <a href=\"%s\" class=\"wc-backward\">Return to shop</a>" 341 341 msgstr "" 342 342 343 #: includes/class-flw-wc-payment-gateway.php:50 3343 #: includes/class-flw-wc-payment-gateway.php:504 344 344 msgid "We were unable to process your order, please try again." 345 345 msgstr "" 346 346 347 #: includes/class-flw-wc-payment-gateway.php:55 0347 #: includes/class-flw-wc-payment-gateway.php:551 348 348 msgid "Order Payment" 349 349 msgstr "" … … 355 355 #. translators: $1. Minimum WooCommerce version. $2. Current WooCommerce version. 356 356 #: includes/notices/class-flw-wc-payment-gateway-notices.php:32 357 msgid "Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. WooCommerce %2$s is no longer supported."357 msgid "Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. kindly upgrade to a higher version of WooCommerce or downgrade to a lower version of Flutterwave WooCommerce that supports WooCommerce version %2$s." 358 358 msgstr "" 359 359 -
rave-woocommerce-payment-gateway/tags/2.3.5/includes/blocks/class-flutterwave-wc-gateway-blocks-support.php
r2916059 r3027434 36 36 * @var WC_Payment_Gateway 37 37 */ 38 protected WC_Payment_Gateway$gateway;38 protected $gateway; 39 39 40 40 /** … … 45 45 public function initialize() { 46 46 $this->settings = get_option( 'woocommerce_rave_settings', array() ); 47 $this->gateway = new FLW_WC_Payment_Gateway(); 47 48 if ( version_compare( WC_VERSION, '6.9.1', '<' ) ) { 49 // For backwards compatibility. 50 if ( ! class_exists( 'FLW_WC_Payment_Gateway' ) ) { 51 require_once dirname( FLW_WC_PLUGIN_FILE ) . '/includes/class-flw-wc-payment-gateway.php'; 52 } 53 54 $this->gateway = new FLW_WC_Payment_Gateway(); 55 } else { 56 $gateways = WC()->payment_gateways->payment_gateways(); 57 $this->gateway = $gateways[ $this->name ]; 58 } 48 59 } 49 60 … … 54 65 */ 55 66 public function is_active(): bool { 67 if ( version_compare( WC_VERSION, '6.9.0', '>' ) ) { 68 $gateways = WC()->payment_gateways->payment_gateways(); 69 70 if ( ! isset( $gateways[ $this->name ] ) ) { 71 return false; 72 } 73 } 74 56 75 return $this->gateway->is_available(); 57 76 } -
rave-woocommerce-payment-gateway/tags/2.3.5/includes/class-flutterwave.php
r2988222 r3027434 19 19 * @var string 20 20 */ 21 public string $version = '2.3. 4';21 public string $version = '2.3.5'; 22 22 23 23 /** … … 75 75 $this->define( 'FLW_WC_DIR_PATH', plugin_dir_path( FLW_WC_PLUGIN_FILE ) ); 76 76 $this->define( 'FLW_WC_VERSION', $this->version ); 77 $this->define( 'FLW_WC_MIN_WC_VER', ' 7.1' );77 $this->define( 'FLW_WC_MIN_WC_VER', '6.9.1' ); 78 78 $this->define( 'FLW_WC_URL', trailingslashit( plugins_url( '/', FLW_WC_PLUGIN_FILE ) ) ); 79 79 $this->define( 'FLW_WC_EPSILON', 0.01 ); -
rave-woocommerce-payment-gateway/tags/2.3.5/includes/class-flw-wc-payment-gateway.php
r2988222 r3027434 417 417 418 418 $flutterwave_request['payment_options'] = $this->payment_options; 419 420 $sdk = $this->sdk->set_event_handler( new FlwEventHandler( $order ) ); 419 $custom_nonce = wp_create_nonce(); 420 $flutterwave_request['redirect_url'] = $flutterwave_request['redirect_url'] . '&_wpnonce=' . $custom_nonce; 421 $sdk = $this->sdk->set_event_handler( new FlwEventHandler( $order ) ); 421 422 422 423 $response = $sdk->get_client()->request( $this->sdk::$standard_inline_endpoint, 'POST', $flutterwave_request ); … … 665 666 $event_data = $event->data; 666 667 668 // check if transaction reference starts with WOOC on hpos enabled. 669 if ( substr( $event_data->tx_ref, 0, 4 ) !== 'WOOC' ) { 670 wp_send_json( 671 array( 672 'status' => 'failed', 673 'message' => 'The transaction reference ' . $event_data->tx_ref . ' is not a Flutterwave WooCommerce Generated transaction', 674 ), 675 WP_Http::OK 676 ); 677 } 678 667 679 $txn_ref = sanitize_text_field( $event_data->tx_ref ); 668 680 $o = explode( '_', $txn_ref ); -
rave-woocommerce-payment-gateway/tags/2.3.5/includes/notices/class-flw-wc-payment-gateway-notices.php
r2916059 r3027434 30 30 public function woocommerce_wc_not_supported() { 31 31 /* translators: $1. Minimum WooCommerce version. $2. Current WooCommerce version. */ 32 echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. WooCommerce %2$s is no longer supported.', 'rave-woocommerce-payment-gateway' ), esc_attr( FLW_WC_MIN_WC_VER ), esc_attr( WC_VERSION ) ) . '</strong></p></div>'; 33 32 echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. kindly upgrade to a higher version of WooCommerce or downgrade to a lower version of Flutterwave WooCommerce that supports WooCommerce version %2$s.', 'rave-woocommerce-payment-gateway' ), esc_attr( FLW_WC_MIN_WC_VER ), esc_attr( WC_VERSION ) ) . '</strong></p></div>'; 34 33 } 35 34 } -
rave-woocommerce-payment-gateway/tags/2.3.5/rave-woocommerce-payment-gateway.php
r2988222 r3027434 4 4 * Plugin URI: https://developer.flutterwave.com/ 5 5 * Description: Official WooCommerce payment gateway for Flutterwave. 6 * Version: 2.3. 46 * Version: 2.3.5 7 7 * Author: Flutterwave Developers 8 8 * Author URI: http://flutterwave.com/us … … 10 10 * Text Domain: rave-woocommerce-payment-gateway 11 11 * Domain Path: i18n/languages 12 * WC requires at least: 7.113 * WC tested up to: 8. 2.112 * WC requires at least: 6.9.1 13 * WC tested up to: 8.4.0 14 14 * Requires at least: 5.6 15 15 * Requires PHP: 7.4 … … 60 60 add_action( 'woocommerce_blocks_loaded', 'flutterwave_woocommerce_blocks_support' ); 61 61 62 63 add_action( 64 'before_woocommerce_init', 65 function() { 66 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { 67 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); 68 } 69 } 70 ); 71 62 72 /** 63 73 * Add the Settings link to the plugin -
rave-woocommerce-payment-gateway/tags/2.3.5/readme.txt
r2988222 r3027434 3 3 Tags: fintech,flutterwave, woocommerce, payments, nigeria, mastercard, visa, target,Naira,payments,verve,donation,church,shop,store, ghana, kenya, international, mastercard, visa 4 4 Requires at least: 3.1 5 Tested up to: 6. 3.26 Stable tag: 2.3. 45 Tested up to: 6.4.2 6 Stable tag: 2.3.5 7 7 License: MIT 8 8 License URI: https://github.com/Flutterwave/Woocommerce/blob/master/LICENSE … … 97 97 98 98 == Changelog == 99 = 2.3.5 = 100 * Added: Support for HPOS. 101 * Fixed: compatibility with WooCommerce 7.1 to 6.9.1 99 102 = 2.3.4 = 100 103 * Fix: Webhook Handler Acknowledgement. -
rave-woocommerce-payment-gateway/trunk/build/index.asset.php
r2916059 r3027434 1 <?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => ' 210eaa3553bf368b8de6');1 <?php return array('dependencies' => array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'ca7ef9ebd15e4df41ad9'); -
rave-woocommerce-payment-gateway/trunk/build/index.js
r2916059 r3027434 1 (()=>{"use strict";const e=window.wc.wcBlocksRegistry,t=window.wp.element,a=window.wp.i18n, l=window.wp.htmlEntities,n="rave",r=window.wc.wcSettings,o=()=>{const e=(0,r.getSetting)("rave_data",null);if(!e)throw new Error("Flutterwave initialization data is not available");return e};var i,c;const w=()=>(0,t.createElement)("div",null,(0,l.decodeEntities)(o()?.description||(0,a.__)("You may be redirected to a secure page to complete your payment.","rave-woocommerce-payment-gateway"))),m=null!==(i=o()?.asset_url)&&void 0!==i?i:null,d={name:n,label:(0,t.createElement)("div",{style:{display:"flex",flexDirection:"row",rowGap:".5em"}},(0,t.createElement)("img",{src:`${m}/img/flutterwave-full.svg`,alt:(0,l.decodeEntities)(o()?.title||(0,a.__)("Flutterwave","rave-woocommerce-payment-gateway"))}),(0,t.createElement)("b",null,(0,t.createElement)("h4",null,"Flutterwave"))),placeOrderButtonLabel:(0,a.__)("Proceed to Flutterwave","rave-woocommerce-payment-gateway"),ariaLabel:(0,l.decodeEntities)(o()?.title||(0,a.__)("Payment via Flutterwave","rave-woocommerce-payment-gateway")),canMakePayment:()=>!0,content:(0,t.createElement)(w,null),edit:(0,t.createElement)(w,null),paymentMethodId:n,supports:{features:null!==(c=o()?.supports)&&void 0!==c?c:[]}};(0,e.registerPaymentMethod)(d)})();1 (()=>{"use strict";const e=window.wc.wcBlocksRegistry,t=window.wp.element,a=window.wp.i18n,n=window.wp.htmlEntities,l="rave",r=window.wc.wcSettings,o=()=>{const e=(0,r.getSetting)("rave_data",null);if(!e)throw new Error("Flutterwave initialization data is not available");return e};var i,c;const w=()=>(0,t.createElement)("div",null,(0,n.decodeEntities)(o()?.description||(0,a.__)("You may be redirected to a secure page to complete your payment.","rave-woocommerce-payment-gateway"))),m=null!==(i=o()?.asset_url)&&void 0!==i?i:null,s={name:l,label:(0,t.createElement)("div",{style:{display:"flex",flexDirection:"row",rowGap:".5em",alignItems:"center"}},(0,t.createElement)("img",{src:`${m}/img/flutterwave-full.svg`,alt:(0,n.decodeEntities)(o()?.title||(0,a.__)("Flutterwave","rave-woocommerce-payment-gateway"))}),(0,t.createElement)("b",null,(0,t.createElement)("h4",null,"Flutterwave"))),placeOrderButtonLabel:(0,a.__)("Proceed to Flutterwave","rave-woocommerce-payment-gateway"),ariaLabel:(0,n.decodeEntities)(o()?.title||(0,a.__)("Payment via Flutterwave","rave-woocommerce-payment-gateway")),canMakePayment:()=>!0,content:(0,t.createElement)(w,null),edit:(0,t.createElement)(w,null),paymentMethodId:l,supports:{features:null!==(c=o()?.supports)&&void 0!==c?c:[]}};(0,e.registerPaymentMethod)(s)})(); -
rave-woocommerce-payment-gateway/trunk/changelog.txt
r2988222 r3027434 1 1 == Changelog == 2 = 2.3.5 = 3 * Added: Support for WooCommerce HPOS. 4 * Fixed: WooCommerce Blocks Compatibility Issues with WooCommerce 7.0 to 6.9.1. 5 * Fixed: Payment Option alignment on WooCommerce Checkout Block. 2 6 = 2.3.4 = 3 7 * Fix: Webhook Handler Acknowledgement. -
rave-woocommerce-payment-gateway/trunk/client/blocks/payment-method/index.js
r2916059 r3027434 26 26 name: PAYMENT_METHOD_NAME, 27 27 label: ( 28 <div style={{ display: 'flex', flexDirection: 'row', rowGap: '.5em' }}>28 <div style={{ display: 'flex', flexDirection: 'row', rowGap: '.5em', alignItems: 'center'}}> 29 29 <img 30 30 src={ `${ FLW_ASSETS }/img/flutterwave-full.svg` } -
rave-woocommerce-payment-gateway/trunk/i18n/languages/rave-woocommerce-payment-gateway.pot
r2988222 r3027434 1 # Copyright (C) 202 3Flutterwave Developers1 # Copyright (C) 2024 Flutterwave Developers 2 2 # This file is distributed under the MIT License. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Flutterwave WooCommerce 2.3. 4\n"5 "Project-Id-Version: Flutterwave WooCommerce 2.3.5\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/rave-woocommerce-payment-gateway\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-11-02T20:18:51+00:00\n"12 "POT-Creation-Date: 2024-01-26T17:05:41+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.9.0\n" … … 38 38 msgstr "" 39 39 40 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 3740 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:156 41 41 msgid "Visa" 42 42 msgstr "" 43 43 44 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 4144 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:160 45 45 msgid "American Express" 46 46 msgstr "" 47 47 48 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 4548 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:164 49 49 msgid "Mastercard" 50 50 msgstr "" 51 51 52 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 5252 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:171 53 53 msgctxt "Name of credit card" 54 54 msgid "Discover" 55 55 msgstr "" 56 56 57 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 5657 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:175 58 58 msgid "JCB" 59 59 msgstr "" 60 60 61 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:1 6061 #: includes/blocks/class-flutterwave-wc-gateway-blocks-support.php:179 62 62 msgid "Diners" 63 63 msgstr "" … … 332 332 333 333 #. translators: %s: url 334 #: includes/class-flw-wc-payment-gateway.php:45 2334 #: includes/class-flw-wc-payment-gateway.php:453 335 335 msgid "Flutterwave is enabled, but the API keys are not set. Please <a href=\"%s\">set your Flutterwave API keys</a> to be able to accept payments." 336 336 msgstr "" 337 337 338 338 #. translators: %s: shop cart url 339 #: includes/class-flw-wc-payment-gateway.php:4 89339 #: includes/class-flw-wc-payment-gateway.php:490 340 340 msgid "Sorry, your session has expired. <a href=\"%s\" class=\"wc-backward\">Return to shop</a>" 341 341 msgstr "" 342 342 343 #: includes/class-flw-wc-payment-gateway.php:50 3343 #: includes/class-flw-wc-payment-gateway.php:504 344 344 msgid "We were unable to process your order, please try again." 345 345 msgstr "" 346 346 347 #: includes/class-flw-wc-payment-gateway.php:55 0347 #: includes/class-flw-wc-payment-gateway.php:551 348 348 msgid "Order Payment" 349 349 msgstr "" … … 355 355 #. translators: $1. Minimum WooCommerce version. $2. Current WooCommerce version. 356 356 #: includes/notices/class-flw-wc-payment-gateway-notices.php:32 357 msgid "Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. WooCommerce %2$s is no longer supported."357 msgid "Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. kindly upgrade to a higher version of WooCommerce or downgrade to a lower version of Flutterwave WooCommerce that supports WooCommerce version %2$s." 358 358 msgstr "" 359 359 -
rave-woocommerce-payment-gateway/trunk/includes/blocks/class-flutterwave-wc-gateway-blocks-support.php
r2916059 r3027434 36 36 * @var WC_Payment_Gateway 37 37 */ 38 protected WC_Payment_Gateway$gateway;38 protected $gateway; 39 39 40 40 /** … … 45 45 public function initialize() { 46 46 $this->settings = get_option( 'woocommerce_rave_settings', array() ); 47 $this->gateway = new FLW_WC_Payment_Gateway(); 47 48 if ( version_compare( WC_VERSION, '6.9.1', '<' ) ) { 49 // For backwards compatibility. 50 if ( ! class_exists( 'FLW_WC_Payment_Gateway' ) ) { 51 require_once dirname( FLW_WC_PLUGIN_FILE ) . '/includes/class-flw-wc-payment-gateway.php'; 52 } 53 54 $this->gateway = new FLW_WC_Payment_Gateway(); 55 } else { 56 $gateways = WC()->payment_gateways->payment_gateways(); 57 $this->gateway = $gateways[ $this->name ]; 58 } 48 59 } 49 60 … … 54 65 */ 55 66 public function is_active(): bool { 67 if ( version_compare( WC_VERSION, '6.9.0', '>' ) ) { 68 $gateways = WC()->payment_gateways->payment_gateways(); 69 70 if ( ! isset( $gateways[ $this->name ] ) ) { 71 return false; 72 } 73 } 74 56 75 return $this->gateway->is_available(); 57 76 } -
rave-woocommerce-payment-gateway/trunk/includes/class-flutterwave.php
r2988222 r3027434 19 19 * @var string 20 20 */ 21 public string $version = '2.3. 4';21 public string $version = '2.3.5'; 22 22 23 23 /** … … 75 75 $this->define( 'FLW_WC_DIR_PATH', plugin_dir_path( FLW_WC_PLUGIN_FILE ) ); 76 76 $this->define( 'FLW_WC_VERSION', $this->version ); 77 $this->define( 'FLW_WC_MIN_WC_VER', ' 7.1' );77 $this->define( 'FLW_WC_MIN_WC_VER', '6.9.1' ); 78 78 $this->define( 'FLW_WC_URL', trailingslashit( plugins_url( '/', FLW_WC_PLUGIN_FILE ) ) ); 79 79 $this->define( 'FLW_WC_EPSILON', 0.01 ); -
rave-woocommerce-payment-gateway/trunk/includes/class-flw-wc-payment-gateway.php
r2988222 r3027434 417 417 418 418 $flutterwave_request['payment_options'] = $this->payment_options; 419 420 $sdk = $this->sdk->set_event_handler( new FlwEventHandler( $order ) ); 419 $custom_nonce = wp_create_nonce(); 420 $flutterwave_request['redirect_url'] = $flutterwave_request['redirect_url'] . '&_wpnonce=' . $custom_nonce; 421 $sdk = $this->sdk->set_event_handler( new FlwEventHandler( $order ) ); 421 422 422 423 $response = $sdk->get_client()->request( $this->sdk::$standard_inline_endpoint, 'POST', $flutterwave_request ); … … 665 666 $event_data = $event->data; 666 667 668 // check if transaction reference starts with WOOC on hpos enabled. 669 if ( substr( $event_data->tx_ref, 0, 4 ) !== 'WOOC' ) { 670 wp_send_json( 671 array( 672 'status' => 'failed', 673 'message' => 'The transaction reference ' . $event_data->tx_ref . ' is not a Flutterwave WooCommerce Generated transaction', 674 ), 675 WP_Http::OK 676 ); 677 } 678 667 679 $txn_ref = sanitize_text_field( $event_data->tx_ref ); 668 680 $o = explode( '_', $txn_ref ); -
rave-woocommerce-payment-gateway/trunk/includes/notices/class-flw-wc-payment-gateway-notices.php
r2916059 r3027434 30 30 public function woocommerce_wc_not_supported() { 31 31 /* translators: $1. Minimum WooCommerce version. $2. Current WooCommerce version. */ 32 echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. WooCommerce %2$s is no longer supported.', 'rave-woocommerce-payment-gateway' ), esc_attr( FLW_WC_MIN_WC_VER ), esc_attr( WC_VERSION ) ) . '</strong></p></div>'; 33 32 echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Flutterwave WooCommerce requires WooCommerce %1$s or greater to be installed and active. kindly upgrade to a higher version of WooCommerce or downgrade to a lower version of Flutterwave WooCommerce that supports WooCommerce version %2$s.', 'rave-woocommerce-payment-gateway' ), esc_attr( FLW_WC_MIN_WC_VER ), esc_attr( WC_VERSION ) ) . '</strong></p></div>'; 34 33 } 35 34 } -
rave-woocommerce-payment-gateway/trunk/rave-woocommerce-payment-gateway.php
r2988222 r3027434 4 4 * Plugin URI: https://developer.flutterwave.com/ 5 5 * Description: Official WooCommerce payment gateway for Flutterwave. 6 * Version: 2.3. 46 * Version: 2.3.5 7 7 * Author: Flutterwave Developers 8 8 * Author URI: http://flutterwave.com/us … … 10 10 * Text Domain: rave-woocommerce-payment-gateway 11 11 * Domain Path: i18n/languages 12 * WC requires at least: 7.113 * WC tested up to: 8. 2.112 * WC requires at least: 6.9.1 13 * WC tested up to: 8.4.0 14 14 * Requires at least: 5.6 15 15 * Requires PHP: 7.4 … … 60 60 add_action( 'woocommerce_blocks_loaded', 'flutterwave_woocommerce_blocks_support' ); 61 61 62 63 add_action( 64 'before_woocommerce_init', 65 function() { 66 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { 67 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); 68 } 69 } 70 ); 71 62 72 /** 63 73 * Add the Settings link to the plugin -
rave-woocommerce-payment-gateway/trunk/readme.txt
r2988222 r3027434 3 3 Tags: fintech,flutterwave, woocommerce, payments, nigeria, mastercard, visa, target,Naira,payments,verve,donation,church,shop,store, ghana, kenya, international, mastercard, visa 4 4 Requires at least: 3.1 5 Tested up to: 6. 3.26 Stable tag: 2.3. 45 Tested up to: 6.4.2 6 Stable tag: 2.3.5 7 7 License: MIT 8 8 License URI: https://github.com/Flutterwave/Woocommerce/blob/master/LICENSE … … 97 97 98 98 == Changelog == 99 = 2.3.5 = 100 * Added: Support for HPOS. 101 * Fixed: compatibility with WooCommerce 7.1 to 6.9.1 99 102 = 2.3.4 = 100 103 * Fix: Webhook Handler Acknowledgement.
Note: See TracChangeset
for help on using the changeset viewer.