Changeset 3239254
- Timestamp:
- 02/12/2025 10:00:25 AM (12 months ago)
- Location:
- woocommerce-quickpay
- Files:
-
- 12 edited
- 2 copied
-
tags/7.3.5 (copied) (copied from woocommerce-quickpay/trunk)
-
tags/7.3.5/README.txt (modified) (1 diff)
-
tags/7.3.5/classes/woocommerce-quickpay-callbacks.php (modified) (1 diff)
-
tags/7.3.5/helpers/transactions.php (modified) (1 diff)
-
tags/7.3.5/trunk (copied) (copied from woocommerce-quickpay/trunk)
-
tags/7.3.5/trunk/README.txt (modified) (1 diff)
-
tags/7.3.5/trunk/classes/woocommerce-quickpay-callbacks.php (modified) (1 diff)
-
tags/7.3.5/trunk/helpers/transactions.php (modified) (1 diff)
-
tags/7.3.5/trunk/woocommerce-quickpay.php (modified) (6 diffs)
-
tags/7.3.5/woocommerce-quickpay.php (modified) (6 diffs)
-
trunk/README.txt (modified) (1 diff)
-
trunk/classes/woocommerce-quickpay-callbacks.php (modified) (1 diff)
-
trunk/helpers/transactions.php (modified) (1 diff)
-
trunk/woocommerce-quickpay.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-quickpay/tags/7.3.5/README.txt
r3095043 r3239254 28 28 29 29 == Changelog == 30 = 7.3.4= 30 = 7.3.5 = 31 * Fix: woocommerce_quickpay_get_order now makes a specific check on WC_Order instance to avoid possible direct property access on a WC_Order object. 32 * Fix: add check in callback handler to avoid payment failed transitioning on orders and subscriptions that does not actually require a payment. 33 * Fix: add extra check on qp_status_code in callback handler to avoid possible incorrect logging when refunds or captures fail. 34 35 = 7.3.4 = 31 36 * Fix: MobilePay Subscriptions now calls WC_Subscription::cancel_order to leverage support of pending-cancel/cancelled logic when setting "Cancelled agreement status" to 'Cancelled'. 32 37 * Fix: Change QuickPay to Quickpay in text strings -
woocommerce-quickpay/tags/7.3.5/classes/woocommerce-quickpay-callbacks.php
r3095043 r3239254 60 60 $order->update_status( 'completed', $capture_note ); 61 61 } else { 62 $order->add_order_note( $capture_note );62 $order->add_order_note( 'Quickpay: ' . $capture_note ); 63 63 } 64 64 -
woocommerce-quickpay/tags/7.3.5/helpers/transactions.php
r2924617 r3239254 93 93 */ 94 94 function woocommerce_quickpay_get_order( $order ): ?WC_Order { 95 95 96 if ( ! is_object( $order ) ) { 96 97 return wc_get_order( $order ) ?: null; 98 } 99 100 if ( $order instanceof WC_Order ) { 101 return $order; 97 102 } 98 103 -
woocommerce-quickpay/tags/7.3.5/trunk/README.txt
r3095043 r3239254 28 28 29 29 == Changelog == 30 = 7.3.4= 30 = 7.3.5 = 31 * Fix: woocommerce_quickpay_get_order now makes a specific check on WC_Order instance to avoid possible direct property access on a WC_Order object. 32 * Fix: add check in callback handler to avoid payment failed transitioning on orders and subscriptions that does not actually require a payment. 33 * Fix: add extra check on qp_status_code in callback handler to avoid possible incorrect logging when refunds or captures fail. 34 35 = 7.3.4 = 31 36 * Fix: MobilePay Subscriptions now calls WC_Subscription::cancel_order to leverage support of pending-cancel/cancelled logic when setting "Cancelled agreement status" to 'Cancelled'. 32 37 * Fix: Change QuickPay to Quickpay in text strings -
woocommerce-quickpay/tags/7.3.5/trunk/classes/woocommerce-quickpay-callbacks.php
r3095043 r3239254 60 60 $order->update_status( 'completed', $capture_note ); 61 61 } else { 62 $order->add_order_note( $capture_note );62 $order->add_order_note( 'Quickpay: ' . $capture_note ); 63 63 } 64 64 -
woocommerce-quickpay/tags/7.3.5/trunk/helpers/transactions.php
r2924617 r3239254 93 93 */ 94 94 function woocommerce_quickpay_get_order( $order ): ?WC_Order { 95 95 96 if ( ! is_object( $order ) ) { 96 97 return wc_get_order( $order ) ?: null; 98 } 99 100 if ( $order instanceof WC_Order ) { 101 return $order; 97 102 } 98 103 -
woocommerce-quickpay/tags/7.3.5/trunk/woocommerce-quickpay.php
r3095043 r3239254 4 4 * Plugin URI: http://wordpress.org/plugins/woocommerce-quickpay/ 5 5 * Description: Integrates your Quickpay payment gateway into your WooCommerce installation. 6 * Version: 7.3. 46 * Version: 7.3.5 7 7 * Author: Perfect Solution 8 8 * Text Domain: woo-quickpay … … 20 20 } 21 21 22 define( 'WCQP_VERSION', '7.3. 4' );22 define( 'WCQP_VERSION', '7.3.5' ); 23 23 define( 'WCQP_URL', plugins_url( __FILE__ ) ); 24 24 define( 'WCQP_PATH', plugin_dir_path( __FILE__ ) ); … … 784 784 $subscription_id = WC_QuickPay_Callbacks::get_subscription_id_from_callback( $json ); 785 785 $subscription = null; 786 786 787 if ( $subscription_id !== null ) { 787 788 $subscription = woocommerce_quickpay_get_subscription( $subscription_id ); … … 797 798 // Is the transaction accepted and approved by QP / Acquirer? 798 799 // Did we find an order? 799 if ( $json->accepted && $order ) {800 if ( $json->accepted && $order && in_array( (int) $transaction->qp_status_code, [ 20000, 20200 ], true ) ) { 800 801 do_action( 'woocommerce_quickpay_accepted_callback_before_processing', $order, $json ); 801 802 do_action( 'woocommerce_quickpay_accepted_callback_before_processing_status_' . $transaction->type, $order, $json ); … … 823 824 824 825 case 'refund' : 825 $order->add_order_note( sprintf( __( 'Refunded %s %s', 'woo-quickpay' ), WC_QuickPay_Helper::price_normalize( $transaction->amount, $json->currency ), $json->currency ) );826 $order->add_order_note( sprintf( 'Quickpay: ' . __( 'Refunded %s %s', 'woo-quickpay' ), WC_QuickPay_Helper::price_normalize( $transaction->amount, $json->currency ), $json->currency ) ); 826 827 break; 827 828 … … 865 866 ] ); 866 867 867 if ( $order && ( $transaction->type === 'recurring' || 'rejected' !== $json->state ) ) {868 if ( $order && $order->needs_payment() && ( $transaction->type === 'recurring' || 'rejected' !== $json->state ) ) { 868 869 $order->update_status( 'failed', sprintf( 'Payment failed <br />QuickPay Message: %s<br />Acquirer Message: %s', $transaction->qp_status_msg, $transaction->aq_status_msg ) ); 869 870 } -
woocommerce-quickpay/tags/7.3.5/woocommerce-quickpay.php
r3095043 r3239254 4 4 * Plugin URI: http://wordpress.org/plugins/woocommerce-quickpay/ 5 5 * Description: Integrates your Quickpay payment gateway into your WooCommerce installation. 6 * Version: 7.3. 46 * Version: 7.3.5 7 7 * Author: Perfect Solution 8 8 * Text Domain: woo-quickpay … … 20 20 } 21 21 22 define( 'WCQP_VERSION', '7.3. 4' );22 define( 'WCQP_VERSION', '7.3.5' ); 23 23 define( 'WCQP_URL', plugins_url( __FILE__ ) ); 24 24 define( 'WCQP_PATH', plugin_dir_path( __FILE__ ) ); … … 784 784 $subscription_id = WC_QuickPay_Callbacks::get_subscription_id_from_callback( $json ); 785 785 $subscription = null; 786 786 787 if ( $subscription_id !== null ) { 787 788 $subscription = woocommerce_quickpay_get_subscription( $subscription_id ); … … 797 798 // Is the transaction accepted and approved by QP / Acquirer? 798 799 // Did we find an order? 799 if ( $json->accepted && $order ) {800 if ( $json->accepted && $order && in_array( (int) $transaction->qp_status_code, [ 20000, 20200 ], true ) ) { 800 801 do_action( 'woocommerce_quickpay_accepted_callback_before_processing', $order, $json ); 801 802 do_action( 'woocommerce_quickpay_accepted_callback_before_processing_status_' . $transaction->type, $order, $json ); … … 823 824 824 825 case 'refund' : 825 $order->add_order_note( sprintf( __( 'Refunded %s %s', 'woo-quickpay' ), WC_QuickPay_Helper::price_normalize( $transaction->amount, $json->currency ), $json->currency ) );826 $order->add_order_note( sprintf( 'Quickpay: ' . __( 'Refunded %s %s', 'woo-quickpay' ), WC_QuickPay_Helper::price_normalize( $transaction->amount, $json->currency ), $json->currency ) ); 826 827 break; 827 828 … … 865 866 ] ); 866 867 867 if ( $order && ( $transaction->type === 'recurring' || 'rejected' !== $json->state ) ) {868 if ( $order && $order->needs_payment() && ( $transaction->type === 'recurring' || 'rejected' !== $json->state ) ) { 868 869 $order->update_status( 'failed', sprintf( 'Payment failed <br />QuickPay Message: %s<br />Acquirer Message: %s', $transaction->qp_status_msg, $transaction->aq_status_msg ) ); 869 870 } -
woocommerce-quickpay/trunk/README.txt
r3095043 r3239254 28 28 29 29 == Changelog == 30 = 7.3.4= 30 = 7.3.5 = 31 * Fix: woocommerce_quickpay_get_order now makes a specific check on WC_Order instance to avoid possible direct property access on a WC_Order object. 32 * Fix: add check in callback handler to avoid payment failed transitioning on orders and subscriptions that does not actually require a payment. 33 * Fix: add extra check on qp_status_code in callback handler to avoid possible incorrect logging when refunds or captures fail. 34 35 = 7.3.4 = 31 36 * Fix: MobilePay Subscriptions now calls WC_Subscription::cancel_order to leverage support of pending-cancel/cancelled logic when setting "Cancelled agreement status" to 'Cancelled'. 32 37 * Fix: Change QuickPay to Quickpay in text strings -
woocommerce-quickpay/trunk/classes/woocommerce-quickpay-callbacks.php
r3095043 r3239254 60 60 $order->update_status( 'completed', $capture_note ); 61 61 } else { 62 $order->add_order_note( $capture_note );62 $order->add_order_note( 'Quickpay: ' . $capture_note ); 63 63 } 64 64 -
woocommerce-quickpay/trunk/helpers/transactions.php
r2924617 r3239254 93 93 */ 94 94 function woocommerce_quickpay_get_order( $order ): ?WC_Order { 95 95 96 if ( ! is_object( $order ) ) { 96 97 return wc_get_order( $order ) ?: null; 98 } 99 100 if ( $order instanceof WC_Order ) { 101 return $order; 97 102 } 98 103 -
woocommerce-quickpay/trunk/woocommerce-quickpay.php
r3095043 r3239254 4 4 * Plugin URI: http://wordpress.org/plugins/woocommerce-quickpay/ 5 5 * Description: Integrates your Quickpay payment gateway into your WooCommerce installation. 6 * Version: 7.3. 46 * Version: 7.3.5 7 7 * Author: Perfect Solution 8 8 * Text Domain: woo-quickpay … … 20 20 } 21 21 22 define( 'WCQP_VERSION', '7.3. 4' );22 define( 'WCQP_VERSION', '7.3.5' ); 23 23 define( 'WCQP_URL', plugins_url( __FILE__ ) ); 24 24 define( 'WCQP_PATH', plugin_dir_path( __FILE__ ) ); … … 784 784 $subscription_id = WC_QuickPay_Callbacks::get_subscription_id_from_callback( $json ); 785 785 $subscription = null; 786 786 787 if ( $subscription_id !== null ) { 787 788 $subscription = woocommerce_quickpay_get_subscription( $subscription_id ); … … 797 798 // Is the transaction accepted and approved by QP / Acquirer? 798 799 // Did we find an order? 799 if ( $json->accepted && $order ) {800 if ( $json->accepted && $order && in_array( (int) $transaction->qp_status_code, [ 20000, 20200 ], true ) ) { 800 801 do_action( 'woocommerce_quickpay_accepted_callback_before_processing', $order, $json ); 801 802 do_action( 'woocommerce_quickpay_accepted_callback_before_processing_status_' . $transaction->type, $order, $json ); … … 823 824 824 825 case 'refund' : 825 $order->add_order_note( sprintf( __( 'Refunded %s %s', 'woo-quickpay' ), WC_QuickPay_Helper::price_normalize( $transaction->amount, $json->currency ), $json->currency ) );826 $order->add_order_note( sprintf( 'Quickpay: ' . __( 'Refunded %s %s', 'woo-quickpay' ), WC_QuickPay_Helper::price_normalize( $transaction->amount, $json->currency ), $json->currency ) ); 826 827 break; 827 828 … … 865 866 ] ); 866 867 867 if ( $order && ( $transaction->type === 'recurring' || 'rejected' !== $json->state ) ) {868 if ( $order && $order->needs_payment() && ( $transaction->type === 'recurring' || 'rejected' !== $json->state ) ) { 868 869 $order->update_status( 'failed', sprintf( 'Payment failed <br />QuickPay Message: %s<br />Acquirer Message: %s', $transaction->qp_status_msg, $transaction->aq_status_msg ) ); 869 870 }
Note: See TracChangeset
for help on using the changeset viewer.