Changeset 2966570
- Timestamp:
- 09/13/2023 02:23:43 PM (2 years ago)
- Location:
- rave-woocommerce-payment-gateway
- Files:
-
- 10 edited
- 1 copied
-
tags/2.3.3 (copied) (copied from rave-woocommerce-payment-gateway/trunk)
-
tags/2.3.3/i18n/languages/rave-woocommerce-payment-gateway.pot (modified) (3 diffs)
-
tags/2.3.3/includes/class-flutterwave.php (modified) (2 diffs)
-
tags/2.3.3/includes/class-flw-wc-payment-gateway-event-handler.php (modified) (3 diffs)
-
tags/2.3.3/rave-woocommerce-payment-gateway.php (modified) (1 diff)
-
tags/2.3.3/readme.txt (modified) (1 diff)
-
trunk/i18n/languages/rave-woocommerce-payment-gateway.pot (modified) (3 diffs)
-
trunk/includes/class-flutterwave.php (modified) (2 diffs)
-
trunk/includes/class-flw-wc-payment-gateway-event-handler.php (modified) (3 diffs)
-
trunk/rave-woocommerce-payment-gateway.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
rave-woocommerce-payment-gateway/tags/2.3.3/i18n/languages/rave-woocommerce-payment-gateway.pot
r2916059 r2966570 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Flutterwave WooCommerce 2.3. 2\n"5 "Project-Id-Version: Flutterwave WooCommerce 2.3.3\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: 2023-0 5-22T19:32:29+00:00\n"12 "POT-Creation-Date: 2023-09-13T14:23:27+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 7.1\n"14 "X-Generator: WP-CLI 2.8.1\n" 15 15 "X-Domain: rave-woocommerce-payment-gateway\n" 16 16 … … 63 63 msgstr "" 64 64 65 #: includes/class-flw-wc-payment-gateway-event-handler.php: 4665 #: includes/class-flw-wc-payment-gateway-event-handler.php:64 66 66 msgid "Payment initialized via Flutterwave" 67 67 msgstr "" 68 68 69 #: includes/class-flw-wc-payment-gateway-event-handler.php: 4869 #: includes/class-flw-wc-payment-gateway-event-handler.php:66 70 70 msgid "Your transaction reference: " 71 71 msgstr "" 72 72 73 #: includes/class-flw-wc-payment-gateway-event-handler.php: 6873 #: includes/class-flw-wc-payment-gateway-event-handler.php:83 74 74 msgid "Attention: New order has been placed on hold because of incorrect payment amount or currency. Please, look into it." 75 75 msgstr "" 76 76 77 #: includes/class-flw-wc-payment-gateway-event-handler.php: 6977 #: includes/class-flw-wc-payment-gateway-event-handler.php:84 78 78 msgid "Amount paid: " 79 79 msgstr "" 80 80 81 #: includes/class-flw-wc-payment-gateway-event-handler.php: 6981 #: includes/class-flw-wc-payment-gateway-event-handler.php:84 82 82 msgid "Order amount: " 83 83 msgstr "" 84 84 85 #: includes/class-flw-wc-payment-gateway-event-handler.php: 6985 #: includes/class-flw-wc-payment-gateway-event-handler.php:84 86 86 msgid " Reference: " 87 87 msgstr "" 88 88 89 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 0989 #: includes/class-flw-wc-payment-gateway-event-handler.php:124 90 90 msgid "The payment failed on Flutterwave" 91 91 msgstr "" 92 92 93 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 1493 #: includes/class-flw-wc-payment-gateway-event-handler.php:129 94 94 msgid "Reason for Failure : " 95 95 msgstr "" 96 96 97 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 2697 #: includes/class-flw-wc-payment-gateway-event-handler.php:141 98 98 msgid "Confirming payment on Flutterwave" 99 99 msgstr "" 100 100 101 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 36101 #: includes/class-flw-wc-payment-gateway-event-handler.php:151 102 102 msgid "An error occured while confirming payment on Flutterwave" 103 103 msgstr "" 104 104 105 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 41105 #: includes/class-flw-wc-payment-gateway-event-handler.php:156 106 106 msgid "Attention: New order has been placed on hold because we could not confirm the payment. Please, look into it." 107 107 msgstr "" 108 108 109 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 57109 #: includes/class-flw-wc-payment-gateway-event-handler.php:172 110 110 msgid "The customer clicked on the cancel button on Checkout." 111 111 msgstr "" 112 112 113 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 59113 #: includes/class-flw-wc-payment-gateway-event-handler.php:174 114 114 msgid "Attention: Customer clicked on the cancel button on the payment gateway. We have updated the order to cancelled status. " 115 115 msgstr "" 116 116 117 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 60117 #: includes/class-flw-wc-payment-gateway-event-handler.php:175 118 118 msgid "Please, confirm from the order notes that there is no note of a successful transaction. If there is, this means that the user was debited and you either have to give value for the transaction or refund the customer." 119 119 msgstr "" 120 120 121 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 74121 #: includes/class-flw-wc-payment-gateway-event-handler.php:189 122 122 msgid "The payment didn't return a valid response. It could have timed out or abandoned by the customer on Flutterwave" 123 123 msgstr "" 124 124 125 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 79125 #: includes/class-flw-wc-payment-gateway-event-handler.php:194 126 126 msgid "Attention: New order has been placed on hold because we could not get a definite response from the payment gateway. Kindly contact the Rave support team at hi@flutterwave.com to confirm the payment." 127 127 msgstr "" 128 128 129 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 80129 #: includes/class-flw-wc-payment-gateway-event-handler.php:195 130 130 msgid "Payment Reference: " 131 131 msgstr "" -
rave-woocommerce-payment-gateway/tags/2.3.3/includes/class-flutterwave.php
r2916059 r2966570 19 19 * @var string 20 20 */ 21 public string $version = '2.3. 2';21 public string $version = '2.3.3'; 22 22 23 23 /** … … 77 77 $this->define( 'FLW_WC_MIN_WC_VER', '7.1' ); 78 78 $this->define( 'FLW_WC_URL', trailingslashit( plugins_url( '/', FLW_WC_PLUGIN_FILE ) ) ); 79 $this->define( 'FLW_WC_EPSILON', 0.01 ); 79 80 } 80 81 -
rave-woocommerce-payment-gateway/tags/2.3.3/includes/class-flw-wc-payment-gateway-event-handler.php
r2916059 r2966570 38 38 39 39 /** 40 * Check Amount Equals. 41 * 42 * Checks to see whether the given amounts are equal using a proper floating 43 * point comparison with an Epsilon which ensures that insignificant decimal 44 * places are ignored in the comparison. 45 * 46 * eg. 100.00 is equal to 100.0001 47 * 48 * @param Float $amount1 1st amount for comparison. 49 * @param Float $amount2 2nd amount for comparison. 50 * @since 2.3.3 51 * @return bool 52 */ 53 public function amounts_equal( $amount1, $amount2 ): bool { 54 return ! ( abs( floatval( $amount1 ) - floatval( $amount2 ) ) > FLW_WC_EPSILON ); 55 } 56 57 /** 40 58 * This is called when the Flutterwave class is initialized 41 59 * … … 56 74 public function on_successful( object $transaction_data ) { 57 75 if ( 'successful' === $transaction_data->status ) { 58 $amount = (float) $transaction_data->amount; 59 $decimal = wc_get_price_decimals() ?? 2; 60 $decimal_separator = wc_get_price_decimal_separator() ?? '.'; 61 $thousand_separator = wc_get_price_thousand_separator() ?? ''; 62 $amount = number_format( $amount, $decimal, $decimal_separator, $thousand_separator ); 63 if ( $transaction_data->currency !== $this->order->get_currency() || $amount !== $this->order->get_total() ) { 76 $amount = (float) $transaction_data->amount; 77 78 if ( $transaction_data->currency !== $this->order->get_currency() || ! $this->amounts_equal( $amount, $this->order->get_total() ) ) { 64 79 $this->order->update_status( 'on-hold' ); 65 80 $customer_note = 'Thank you for your order.<br>'; … … 67 82 $customer_note .= 'because the we couldn\t verify your order. Please, contact us for information regarding this order.'; 68 83 $admin_note = esc_html__( 'Attention: New order has been placed on hold because of incorrect payment amount or currency. Please, look into it.', 'rave-woocommerce-payment-gateway' ) . '<br>'; 69 $admin_note .= esc_html__( 'Amount paid: ', 'rave-woocommerce-payment-gateway' ) . $transaction_data->currency . ' ' . $ transaction_data->amount . ' <br>' . esc_html__( 'Order amount: ', 'rave-woocommerce-payment-gateway' ) . $this->order->get_currency() . ' ' . $this->order->get_total() . ' <br>' . esc_html__( ' Reference: ', 'rave-woocommerce-payment-gateway' ) . $transaction_data->tx_ref;84 $admin_note .= esc_html__( 'Amount paid: ', 'rave-woocommerce-payment-gateway' ) . $transaction_data->currency . ' ' . $amount . ' <br>' . esc_html__( 'Order amount: ', 'rave-woocommerce-payment-gateway' ) . $this->order->get_currency() . ' ' . $this->order->get_total() . ' <br>' . esc_html__( ' Reference: ', 'rave-woocommerce-payment-gateway' ) . $transaction_data->tx_ref; 70 85 71 86 $this->order->add_order_note( $customer_note, 1 ); -
rave-woocommerce-payment-gateway/tags/2.3.3/rave-woocommerce-payment-gateway.php
r2916059 r2966570 4 4 * Plugin URI: https://developer.flutterwave.com/ 5 5 * Description: Official WooCommerce payment gateway for Flutterwave. 6 * Version: 2.3. 26 * Version: 2.3.3 7 7 * Author: Flutterwave Developers 8 8 * Author URI: http://flutterwave.com/us -
rave-woocommerce-payment-gateway/tags/2.3.3/readme.txt
r2916059 r2966570 4 4 Requires at least: 3.1 5 5 Tested up to: 6.2.1 6 Stable tag: 2.3. 26 Stable tag: 2.3.3 7 7 License: MIT 8 8 License URI: https://github.com/Flutterwave/Woocommerce/blob/master/LICENSE -
rave-woocommerce-payment-gateway/trunk/i18n/languages/rave-woocommerce-payment-gateway.pot
r2916059 r2966570 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Flutterwave WooCommerce 2.3. 2\n"5 "Project-Id-Version: Flutterwave WooCommerce 2.3.3\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: 2023-0 5-22T19:32:29+00:00\n"12 "POT-Creation-Date: 2023-09-13T14:23:27+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 7.1\n"14 "X-Generator: WP-CLI 2.8.1\n" 15 15 "X-Domain: rave-woocommerce-payment-gateway\n" 16 16 … … 63 63 msgstr "" 64 64 65 #: includes/class-flw-wc-payment-gateway-event-handler.php: 4665 #: includes/class-flw-wc-payment-gateway-event-handler.php:64 66 66 msgid "Payment initialized via Flutterwave" 67 67 msgstr "" 68 68 69 #: includes/class-flw-wc-payment-gateway-event-handler.php: 4869 #: includes/class-flw-wc-payment-gateway-event-handler.php:66 70 70 msgid "Your transaction reference: " 71 71 msgstr "" 72 72 73 #: includes/class-flw-wc-payment-gateway-event-handler.php: 6873 #: includes/class-flw-wc-payment-gateway-event-handler.php:83 74 74 msgid "Attention: New order has been placed on hold because of incorrect payment amount or currency. Please, look into it." 75 75 msgstr "" 76 76 77 #: includes/class-flw-wc-payment-gateway-event-handler.php: 6977 #: includes/class-flw-wc-payment-gateway-event-handler.php:84 78 78 msgid "Amount paid: " 79 79 msgstr "" 80 80 81 #: includes/class-flw-wc-payment-gateway-event-handler.php: 6981 #: includes/class-flw-wc-payment-gateway-event-handler.php:84 82 82 msgid "Order amount: " 83 83 msgstr "" 84 84 85 #: includes/class-flw-wc-payment-gateway-event-handler.php: 6985 #: includes/class-flw-wc-payment-gateway-event-handler.php:84 86 86 msgid " Reference: " 87 87 msgstr "" 88 88 89 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 0989 #: includes/class-flw-wc-payment-gateway-event-handler.php:124 90 90 msgid "The payment failed on Flutterwave" 91 91 msgstr "" 92 92 93 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 1493 #: includes/class-flw-wc-payment-gateway-event-handler.php:129 94 94 msgid "Reason for Failure : " 95 95 msgstr "" 96 96 97 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 2697 #: includes/class-flw-wc-payment-gateway-event-handler.php:141 98 98 msgid "Confirming payment on Flutterwave" 99 99 msgstr "" 100 100 101 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 36101 #: includes/class-flw-wc-payment-gateway-event-handler.php:151 102 102 msgid "An error occured while confirming payment on Flutterwave" 103 103 msgstr "" 104 104 105 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 41105 #: includes/class-flw-wc-payment-gateway-event-handler.php:156 106 106 msgid "Attention: New order has been placed on hold because we could not confirm the payment. Please, look into it." 107 107 msgstr "" 108 108 109 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 57109 #: includes/class-flw-wc-payment-gateway-event-handler.php:172 110 110 msgid "The customer clicked on the cancel button on Checkout." 111 111 msgstr "" 112 112 113 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 59113 #: includes/class-flw-wc-payment-gateway-event-handler.php:174 114 114 msgid "Attention: Customer clicked on the cancel button on the payment gateway. We have updated the order to cancelled status. " 115 115 msgstr "" 116 116 117 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 60117 #: includes/class-flw-wc-payment-gateway-event-handler.php:175 118 118 msgid "Please, confirm from the order notes that there is no note of a successful transaction. If there is, this means that the user was debited and you either have to give value for the transaction or refund the customer." 119 119 msgstr "" 120 120 121 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 74121 #: includes/class-flw-wc-payment-gateway-event-handler.php:189 122 122 msgid "The payment didn't return a valid response. It could have timed out or abandoned by the customer on Flutterwave" 123 123 msgstr "" 124 124 125 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 79125 #: includes/class-flw-wc-payment-gateway-event-handler.php:194 126 126 msgid "Attention: New order has been placed on hold because we could not get a definite response from the payment gateway. Kindly contact the Rave support team at hi@flutterwave.com to confirm the payment." 127 127 msgstr "" 128 128 129 #: includes/class-flw-wc-payment-gateway-event-handler.php:1 80129 #: includes/class-flw-wc-payment-gateway-event-handler.php:195 130 130 msgid "Payment Reference: " 131 131 msgstr "" -
rave-woocommerce-payment-gateway/trunk/includes/class-flutterwave.php
r2916059 r2966570 19 19 * @var string 20 20 */ 21 public string $version = '2.3. 2';21 public string $version = '2.3.3'; 22 22 23 23 /** … … 77 77 $this->define( 'FLW_WC_MIN_WC_VER', '7.1' ); 78 78 $this->define( 'FLW_WC_URL', trailingslashit( plugins_url( '/', FLW_WC_PLUGIN_FILE ) ) ); 79 $this->define( 'FLW_WC_EPSILON', 0.01 ); 79 80 } 80 81 -
rave-woocommerce-payment-gateway/trunk/includes/class-flw-wc-payment-gateway-event-handler.php
r2916059 r2966570 38 38 39 39 /** 40 * Check Amount Equals. 41 * 42 * Checks to see whether the given amounts are equal using a proper floating 43 * point comparison with an Epsilon which ensures that insignificant decimal 44 * places are ignored in the comparison. 45 * 46 * eg. 100.00 is equal to 100.0001 47 * 48 * @param Float $amount1 1st amount for comparison. 49 * @param Float $amount2 2nd amount for comparison. 50 * @since 2.3.3 51 * @return bool 52 */ 53 public function amounts_equal( $amount1, $amount2 ): bool { 54 return ! ( abs( floatval( $amount1 ) - floatval( $amount2 ) ) > FLW_WC_EPSILON ); 55 } 56 57 /** 40 58 * This is called when the Flutterwave class is initialized 41 59 * … … 56 74 public function on_successful( object $transaction_data ) { 57 75 if ( 'successful' === $transaction_data->status ) { 58 $amount = (float) $transaction_data->amount; 59 $decimal = wc_get_price_decimals() ?? 2; 60 $decimal_separator = wc_get_price_decimal_separator() ?? '.'; 61 $thousand_separator = wc_get_price_thousand_separator() ?? ''; 62 $amount = number_format( $amount, $decimal, $decimal_separator, $thousand_separator ); 63 if ( $transaction_data->currency !== $this->order->get_currency() || $amount !== $this->order->get_total() ) { 76 $amount = (float) $transaction_data->amount; 77 78 if ( $transaction_data->currency !== $this->order->get_currency() || ! $this->amounts_equal( $amount, $this->order->get_total() ) ) { 64 79 $this->order->update_status( 'on-hold' ); 65 80 $customer_note = 'Thank you for your order.<br>'; … … 67 82 $customer_note .= 'because the we couldn\t verify your order. Please, contact us for information regarding this order.'; 68 83 $admin_note = esc_html__( 'Attention: New order has been placed on hold because of incorrect payment amount or currency. Please, look into it.', 'rave-woocommerce-payment-gateway' ) . '<br>'; 69 $admin_note .= esc_html__( 'Amount paid: ', 'rave-woocommerce-payment-gateway' ) . $transaction_data->currency . ' ' . $ transaction_data->amount . ' <br>' . esc_html__( 'Order amount: ', 'rave-woocommerce-payment-gateway' ) . $this->order->get_currency() . ' ' . $this->order->get_total() . ' <br>' . esc_html__( ' Reference: ', 'rave-woocommerce-payment-gateway' ) . $transaction_data->tx_ref;84 $admin_note .= esc_html__( 'Amount paid: ', 'rave-woocommerce-payment-gateway' ) . $transaction_data->currency . ' ' . $amount . ' <br>' . esc_html__( 'Order amount: ', 'rave-woocommerce-payment-gateway' ) . $this->order->get_currency() . ' ' . $this->order->get_total() . ' <br>' . esc_html__( ' Reference: ', 'rave-woocommerce-payment-gateway' ) . $transaction_data->tx_ref; 70 85 71 86 $this->order->add_order_note( $customer_note, 1 ); -
rave-woocommerce-payment-gateway/trunk/rave-woocommerce-payment-gateway.php
r2916059 r2966570 4 4 * Plugin URI: https://developer.flutterwave.com/ 5 5 * Description: Official WooCommerce payment gateway for Flutterwave. 6 * Version: 2.3. 26 * Version: 2.3.3 7 7 * Author: Flutterwave Developers 8 8 * Author URI: http://flutterwave.com/us -
rave-woocommerce-payment-gateway/trunk/readme.txt
r2916059 r2966570 4 4 Requires at least: 3.1 5 5 Tested up to: 6.2.1 6 Stable tag: 2.3. 26 Stable tag: 2.3.3 7 7 License: MIT 8 8 License URI: https://github.com/Flutterwave/Woocommerce/blob/master/LICENSE
Note: See TracChangeset
for help on using the changeset viewer.