Changeset 3220062
- Timestamp:
- 01/10/2025 09:07:51 AM (14 months ago)
- Location:
- rave-woocommerce-payment-gateway
- Files:
-
- 14 edited
- 1 copied
-
tags/2.3.7 (copied) (copied from rave-woocommerce-payment-gateway/trunk)
-
tags/2.3.7/changelog.txt (modified) (1 diff)
-
tags/2.3.7/i18n/languages/rave-woocommerce-payment-gateway.pot (modified) (4 diffs)
-
tags/2.3.7/includes/class-flutterwave.php (modified) (3 diffs)
-
tags/2.3.7/includes/class-flw-wc-payment-gateway.php (modified) (4 diffs)
-
tags/2.3.7/includes/client/class-flw-wc-payment-gateway-request.php (modified) (4 diffs)
-
tags/2.3.7/rave-woocommerce-payment-gateway.php (modified) (2 diffs)
-
tags/2.3.7/readme.txt (modified) (2 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/i18n/languages/rave-woocommerce-payment-gateway.pot (modified) (4 diffs)
-
trunk/includes/class-flutterwave.php (modified) (3 diffs)
-
trunk/includes/class-flw-wc-payment-gateway.php (modified) (4 diffs)
-
trunk/includes/client/class-flw-wc-payment-gateway-request.php (modified) (4 diffs)
-
trunk/rave-woocommerce-payment-gateway.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rave-woocommerce-payment-gateway/tags/2.3.7/changelog.txt
r3027434 r3220062 1 1 == Changelog == 2 = 2.3.6 = 3 * Fixed: Dynamic Adjustment to Custom Permalink Set by Merchant. 4 * Fixed: Redirect Payment option return a Payment Mismatch Error. 2 5 = 2.3.5 = 3 6 * Added: Support for WooCommerce HPOS. -
rave-woocommerce-payment-gateway/tags/2.3.7/i18n/languages/rave-woocommerce-payment-gateway.pot
r3027434 r3220062 1 # Copyright (C) 202 4Flutterwave Developers1 # Copyright (C) 2025 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. 5\n"5 "Project-Id-Version: Flutterwave WooCommerce 2.3.6\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 4-01-26T17:05:41+00:00\n"12 "POT-Creation-Date: 2025-01-10T09:07:15+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 9.0\n"14 "X-Generator: WP-CLI 2.11.0\n" 15 15 "X-Domain: rave-woocommerce-payment-gateway\n" 16 16 17 17 #. Plugin Name of the plugin 18 18 #. Translators: %s Plugin name. 19 #: rave-woocommerce-payment-gateway.php 19 20 #: includes/class-flw-wc-payment-gateway.php:227 20 21 #: includes/views/html-admin-missing-woocommerce.php:15 … … 23 24 24 25 #. Plugin URI of the plugin 26 #: rave-woocommerce-payment-gateway.php 25 27 msgid "https://developer.flutterwave.com/" 26 28 msgstr "" 27 29 28 30 #. Description of the plugin 31 #: rave-woocommerce-payment-gateway.php 29 32 msgid "Official WooCommerce payment gateway for Flutterwave." 30 33 msgstr "" 31 34 32 35 #. Author of the plugin 36 #: rave-woocommerce-payment-gateway.php 33 37 msgid "Flutterwave Developers" 34 38 msgstr "" 35 39 36 40 #. Author URI of the plugin 41 #: rave-woocommerce-payment-gateway.php 37 42 msgid "http://flutterwave.com/us" 38 43 msgstr "" … … 345 350 msgstr "" 346 351 347 #: includes/class-flw-wc-payment-gateway.php:5 51352 #: includes/class-flw-wc-payment-gateway.php:579 348 353 msgid "Order Payment" 349 354 msgstr "" 350 355 351 #: includes/client/class-flw-wc-payment-gateway-request.php:1 26356 #: includes/client/class-flw-wc-payment-gateway-request.php:153 352 357 msgid "Payment for order " 353 358 msgstr "" -
rave-woocommerce-payment-gateway/tags/2.3.7/includes/class-flutterwave.php
r3027434 r3220062 19 19 * @var string 20 20 */ 21 public string $version = '2.3. 5';21 public string $version = '2.3.6'; 22 22 23 23 /** … … 27 27 */ 28 28 public string $api_version = 'v3'; 29 29 30 /** 30 31 * Plugin instance. … … 120 121 121 122 $this->register_payment_gateway(); 122 123 123 } 124 124 -
rave-woocommerce-payment-gateway/tags/2.3.7/includes/class-flw-wc-payment-gateway.php
r3027434 r3220062 533 533 $currency = $order->get_currency(); 534 534 $custom_nonce = wp_create_nonce(); 535 $redirect_url = WC()->api_request_url( 'FLW_WC_Payment_Gateway' ) . '?order_id=' . $order_id . '&_wpnonce=' . $custom_nonce; 535 $redirect_url = ''; 536 537 $flutterwave_woo_url = WC()->api_request_url( 'FLW_WC_Payment_Gateway' ); 538 539 // Parse the base URL to check for existing query parameters. 540 $url_parts = wp_parse_url( $flutterwave_woo_url ); 541 542 // If the base URL already has query parameters, merge them with new ones. 543 if ( isset( $url_parts['query'] ) ) { 544 // Convert the query string to an array. 545 parse_str( $url_parts['query'], $query_array ); 546 547 // Add the new parameters to the existing query array. 548 $query_array['order_id'] = $order_id; 549 550 // Rebuild the query string with the new parameters. 551 $new_query_string = http_build_query( $query_array ); 552 553 // Rebuild the final URL with the new query string. 554 $redirect_url = $url_parts['scheme'] . '://' . $url_parts['host'] . $url_parts['path'] . '?' . $new_query_string; 555 } else { 556 // If no existing query parameters, simply append the new ones. 557 $redirect_url = add_query_arg( 558 array( 559 'order_id' => $order_id, 560 '_wpnonce' => $custom_nonce, 561 ), 562 $flutterwave_woo_url 563 ); 564 } 536 565 537 566 if ( $the_order_id === $order_id && $the_order_key === $order_key ) { 538 539 567 $payment_args['email'] = $email; 540 568 $payment_args['amount'] = $amount; … … 561 589 562 590 /** 563 * Verify payment made on the checkout page 591 * Verify payment made on the checkout page. 564 592 * 565 593 * @return void … … 600 628 601 629 /** 602 * Process Webhook 630 * Process Webhook. 603 631 */ 604 632 public function flutterwave_webhooks() { … … 681 709 $order_id = intval( $o[1] ); 682 710 $order = wc_get_order( $order_id ); 711 712 if ( ! $order ) { 713 wp_send_json( 714 array( 715 'status' => 'error', 716 'message' => 'Invalid Reference', 717 'reason' => 'Order does not belong to store', 718 ), 719 WP_Http::BAD_REQUEST 720 ); 721 } 722 683 723 // get order status. 684 724 $current_order_status = $order->get_status(); -
rave-woocommerce-payment-gateway/tags/2.3.7/includes/client/class-flw-wc-payment-gateway-request.php
r2916059 r3220062 83 83 $order_id = $order->get_id(); 84 84 $txnref = 'WOOC_' . $order_id . '_' . time(); 85 $amount = $order->get_total();85 $amount = (float) $order->get_total(); 86 86 $currency = $order->get_currency(); 87 87 $email = $order->get_billing_email(); … … 96 96 } 97 97 98 $data_to_hash = array(98 $data_to_hash = array( 99 99 'amount' => $amount, 100 100 'currency' => $currency, … … 103 103 'secret_key' => $secret_key, 104 104 ); 105 105 106 $checkout_hash = $this->generate_checkout_hash( $data_to_hash ); 107 108 // Parse the base URL to check for existing query parameters. 109 $url_parts = wp_parse_url( $this->notify_url ); 110 111 // If the base URL already has query parameters, merge them with new ones. 112 if ( isset( $url_parts['query'] ) ) { 113 // Convert the query string to an array. 114 parse_str( $url_parts['query'], $query_array ); 115 116 // Add the new parameters to the existing query array. 117 $query_array['order_id'] = $order_id; 118 119 // Rebuild the query string with the new parameters. 120 $new_query_string = http_build_query( $query_array ); 121 122 // Rebuild the final URL with the new query string. 123 $callback_url = $url_parts['scheme'] . '://' . $url_parts['host'] . $url_parts['path'] . '?' . $new_query_string; 124 } else { 125 // If no existing query parameters, simply append the new ones. 126 $callback_url = add_query_arg( 127 array( 128 'order_id' => $order_id, 129 ), 130 $this->notify_url 131 ); 132 } 106 133 107 134 return array( … … 110 137 'currency' => $currency, 111 138 'payment_options' => 'card', 112 'redirect_url' => $ this->notify_url . '?order_id=' . $order_id,139 'redirect_url' => $callback_url, 113 140 'payload_hash' => $checkout_hash, 114 141 'customer' => array( -
rave-woocommerce-payment-gateway/tags/2.3.7/rave-woocommerce-payment-gateway.php
r3027434 r3220062 4 4 * Plugin URI: https://developer.flutterwave.com/ 5 5 * Description: Official WooCommerce payment gateway for Flutterwave. 6 * Version: 2.3. 56 * Version: 2.3.6 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: 6.9.112 * WC requires at least: 9.6.0 13 13 * WC tested up to: 8.4.0 14 14 * Requires at least: 5.6 -
rave-woocommerce-payment-gateway/tags/2.3.7/readme.txt
r3027434 r3220062 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. 4.26 Stable tag: 2.3. 55 Tested up to: 6.7.1 6 Stable tag: 2.3.6 7 7 License: MIT 8 8 License URI: https://github.com/Flutterwave/Woocommerce/blob/master/LICENSE … … 97 97 98 98 == Changelog == 99 = 2.3.6 = 100 * Fixed: Dynamic Adjustment to Custom Permalink Set by Merchant. 101 * Fixed: Redirect Payment option return a Payment Mismatch Error. 99 102 = 2.3.5 = 100 103 * Added: Support for HPOS. -
rave-woocommerce-payment-gateway/trunk/changelog.txt
r3027434 r3220062 1 1 == Changelog == 2 = 2.3.6 = 3 * Fixed: Dynamic Adjustment to Custom Permalink Set by Merchant. 4 * Fixed: Redirect Payment option return a Payment Mismatch Error. 2 5 = 2.3.5 = 3 6 * Added: Support for WooCommerce HPOS. -
rave-woocommerce-payment-gateway/trunk/i18n/languages/rave-woocommerce-payment-gateway.pot
r3027434 r3220062 1 # Copyright (C) 202 4Flutterwave Developers1 # Copyright (C) 2025 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. 5\n"5 "Project-Id-Version: Flutterwave WooCommerce 2.3.6\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 4-01-26T17:05:41+00:00\n"12 "POT-Creation-Date: 2025-01-10T09:07:15+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 9.0\n"14 "X-Generator: WP-CLI 2.11.0\n" 15 15 "X-Domain: rave-woocommerce-payment-gateway\n" 16 16 17 17 #. Plugin Name of the plugin 18 18 #. Translators: %s Plugin name. 19 #: rave-woocommerce-payment-gateway.php 19 20 #: includes/class-flw-wc-payment-gateway.php:227 20 21 #: includes/views/html-admin-missing-woocommerce.php:15 … … 23 24 24 25 #. Plugin URI of the plugin 26 #: rave-woocommerce-payment-gateway.php 25 27 msgid "https://developer.flutterwave.com/" 26 28 msgstr "" 27 29 28 30 #. Description of the plugin 31 #: rave-woocommerce-payment-gateway.php 29 32 msgid "Official WooCommerce payment gateway for Flutterwave." 30 33 msgstr "" 31 34 32 35 #. Author of the plugin 36 #: rave-woocommerce-payment-gateway.php 33 37 msgid "Flutterwave Developers" 34 38 msgstr "" 35 39 36 40 #. Author URI of the plugin 41 #: rave-woocommerce-payment-gateway.php 37 42 msgid "http://flutterwave.com/us" 38 43 msgstr "" … … 345 350 msgstr "" 346 351 347 #: includes/class-flw-wc-payment-gateway.php:5 51352 #: includes/class-flw-wc-payment-gateway.php:579 348 353 msgid "Order Payment" 349 354 msgstr "" 350 355 351 #: includes/client/class-flw-wc-payment-gateway-request.php:1 26356 #: includes/client/class-flw-wc-payment-gateway-request.php:153 352 357 msgid "Payment for order " 353 358 msgstr "" -
rave-woocommerce-payment-gateway/trunk/includes/class-flutterwave.php
r3027434 r3220062 19 19 * @var string 20 20 */ 21 public string $version = '2.3. 5';21 public string $version = '2.3.6'; 22 22 23 23 /** … … 27 27 */ 28 28 public string $api_version = 'v3'; 29 29 30 /** 30 31 * Plugin instance. … … 120 121 121 122 $this->register_payment_gateway(); 122 123 123 } 124 124 -
rave-woocommerce-payment-gateway/trunk/includes/class-flw-wc-payment-gateway.php
r3027434 r3220062 533 533 $currency = $order->get_currency(); 534 534 $custom_nonce = wp_create_nonce(); 535 $redirect_url = WC()->api_request_url( 'FLW_WC_Payment_Gateway' ) . '?order_id=' . $order_id . '&_wpnonce=' . $custom_nonce; 535 $redirect_url = ''; 536 537 $flutterwave_woo_url = WC()->api_request_url( 'FLW_WC_Payment_Gateway' ); 538 539 // Parse the base URL to check for existing query parameters. 540 $url_parts = wp_parse_url( $flutterwave_woo_url ); 541 542 // If the base URL already has query parameters, merge them with new ones. 543 if ( isset( $url_parts['query'] ) ) { 544 // Convert the query string to an array. 545 parse_str( $url_parts['query'], $query_array ); 546 547 // Add the new parameters to the existing query array. 548 $query_array['order_id'] = $order_id; 549 550 // Rebuild the query string with the new parameters. 551 $new_query_string = http_build_query( $query_array ); 552 553 // Rebuild the final URL with the new query string. 554 $redirect_url = $url_parts['scheme'] . '://' . $url_parts['host'] . $url_parts['path'] . '?' . $new_query_string; 555 } else { 556 // If no existing query parameters, simply append the new ones. 557 $redirect_url = add_query_arg( 558 array( 559 'order_id' => $order_id, 560 '_wpnonce' => $custom_nonce, 561 ), 562 $flutterwave_woo_url 563 ); 564 } 536 565 537 566 if ( $the_order_id === $order_id && $the_order_key === $order_key ) { 538 539 567 $payment_args['email'] = $email; 540 568 $payment_args['amount'] = $amount; … … 561 589 562 590 /** 563 * Verify payment made on the checkout page 591 * Verify payment made on the checkout page. 564 592 * 565 593 * @return void … … 600 628 601 629 /** 602 * Process Webhook 630 * Process Webhook. 603 631 */ 604 632 public function flutterwave_webhooks() { … … 681 709 $order_id = intval( $o[1] ); 682 710 $order = wc_get_order( $order_id ); 711 712 if ( ! $order ) { 713 wp_send_json( 714 array( 715 'status' => 'error', 716 'message' => 'Invalid Reference', 717 'reason' => 'Order does not belong to store', 718 ), 719 WP_Http::BAD_REQUEST 720 ); 721 } 722 683 723 // get order status. 684 724 $current_order_status = $order->get_status(); -
rave-woocommerce-payment-gateway/trunk/includes/client/class-flw-wc-payment-gateway-request.php
r2916059 r3220062 83 83 $order_id = $order->get_id(); 84 84 $txnref = 'WOOC_' . $order_id . '_' . time(); 85 $amount = $order->get_total();85 $amount = (float) $order->get_total(); 86 86 $currency = $order->get_currency(); 87 87 $email = $order->get_billing_email(); … … 96 96 } 97 97 98 $data_to_hash = array(98 $data_to_hash = array( 99 99 'amount' => $amount, 100 100 'currency' => $currency, … … 103 103 'secret_key' => $secret_key, 104 104 ); 105 105 106 $checkout_hash = $this->generate_checkout_hash( $data_to_hash ); 107 108 // Parse the base URL to check for existing query parameters. 109 $url_parts = wp_parse_url( $this->notify_url ); 110 111 // If the base URL already has query parameters, merge them with new ones. 112 if ( isset( $url_parts['query'] ) ) { 113 // Convert the query string to an array. 114 parse_str( $url_parts['query'], $query_array ); 115 116 // Add the new parameters to the existing query array. 117 $query_array['order_id'] = $order_id; 118 119 // Rebuild the query string with the new parameters. 120 $new_query_string = http_build_query( $query_array ); 121 122 // Rebuild the final URL with the new query string. 123 $callback_url = $url_parts['scheme'] . '://' . $url_parts['host'] . $url_parts['path'] . '?' . $new_query_string; 124 } else { 125 // If no existing query parameters, simply append the new ones. 126 $callback_url = add_query_arg( 127 array( 128 'order_id' => $order_id, 129 ), 130 $this->notify_url 131 ); 132 } 106 133 107 134 return array( … … 110 137 'currency' => $currency, 111 138 'payment_options' => 'card', 112 'redirect_url' => $ this->notify_url . '?order_id=' . $order_id,139 'redirect_url' => $callback_url, 113 140 'payload_hash' => $checkout_hash, 114 141 'customer' => array( -
rave-woocommerce-payment-gateway/trunk/rave-woocommerce-payment-gateway.php
r3027434 r3220062 4 4 * Plugin URI: https://developer.flutterwave.com/ 5 5 * Description: Official WooCommerce payment gateway for Flutterwave. 6 * Version: 2.3. 56 * Version: 2.3.6 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: 6.9.112 * WC requires at least: 9.6.0 13 13 * WC tested up to: 8.4.0 14 14 * Requires at least: 5.6 -
rave-woocommerce-payment-gateway/trunk/readme.txt
r3027434 r3220062 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. 4.26 Stable tag: 2.3. 55 Tested up to: 6.7.1 6 Stable tag: 2.3.6 7 7 License: MIT 8 8 License URI: https://github.com/Flutterwave/Woocommerce/blob/master/LICENSE … … 97 97 98 98 == Changelog == 99 = 2.3.6 = 100 * Fixed: Dynamic Adjustment to Custom Permalink Set by Merchant. 101 * Fixed: Redirect Payment option return a Payment Mismatch Error. 99 102 = 2.3.5 = 100 103 * Added: Support for HPOS.
Note: See TracChangeset
for help on using the changeset viewer.