Changeset 2953032
- Timestamp:
- 08/14/2023 06:23:16 AM (3 years ago)
- Location:
- payflex-payment-gateway/trunk
- Files:
-
- 2 edited
-
partpay.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
payflex-payment-gateway/trunk/partpay.php
r2934945 r2953032 3 3 Plugin Name: Payflex Payment Gateway 4 4 Description: Use Payflex as a credit card processor for WooCommerce. 5 Version: 2.4. 75 Version: 2.4.8 6 6 Author: Payflex 7 7 */ … … 47 47 class WC_Gateway_PartPay extends WC_Payment_Gateway 48 48 { 49 49 protected array $environments = []; 50 protected string $configurationUrl = ''; 51 protected string $orderurl = ''; 50 52 /** 51 53 * @var $_instance WC_Gateway_PartPay The reference to the singleton instance of this class … … 926 928 $responsecode = isset($refund_response['response']['code']) ? intval($refund_response['response']['code']) : 0; 927 929 928 if ($responsecode == 201 || $responsecode == 200) 929 { 930 if ($responsecode == 201 || $responsecode == 200) { 930 931 $order->add_order_note(sprintf(__('Refund of $%s successfully sent to PayFlex.', 'woo_partpay') , $amount)); 931 932 return true; 932 } 933 else 934 { 935 if ($responsecode == 404) 936 { 933 } else if($responsecode === 400 && $refund_body->errorCode==='MRM007') { 934 $error_message = $refund_body->message; 935 $order->add_order_note(sprintf(__($error_message), 'woo_partpay')); 936 $error = new WP_Error( 'woocommerce_api_create_order_refund_api_failed', $error_message); 937 return $error; 938 } else { 939 if ($responsecode == 404) { 937 940 $order->add_order_note(sprintf(__('Order not found on Payflex.', 'woo_partpay'))); 938 } 939 else 940 { 941 } else { 941 942 $order->add_order_note(sprintf(__('There was an error submitting the refund to Payflex.', 'woo_partpay'))); 942 943 } … … 1265 1266 add_filter('cron_schedules', 'partpay_add_two_minute_schedule'); 1266 1267 add_shortcode('payflex_widget', 'widget_shortcode_content'); 1267 add_action('woocommerce_single_product_summary', 'widget_content', 25); 1268 global $wp_version; 1269 if($wp_version >= 6.3){ 1270 add_action('woocommerce_before_add_to_cart_form', 'widget_content', 0); 1271 }else{ 1272 add_action('woocommerce_single_product_summary', 'widget_content', 12); 1273 } 1274 1275 1268 1276 // FUNCTION - Frontend show on single product page 1269 1277 function widget_content(){ … … 1287 1295 if ($payflex_frontend == 'no' && $payflex_frontend_page_builder == 'no'){ return; } 1288 1296 global $product; 1297 if(!$product){ return; } 1289 1298 // Early exit if product is a WooCommerce Subscription type product: 1290 1299 if (class_exists('WC_Subscriptions_Product') && WC_Subscriptions_Product::is_subscription($product)){ -
payflex-payment-gateway/trunk/readme.txt
r2934945 r2953032 3 3 Tags: credit card,debit card, payflex, payment request, woocommerce, automattic 4 4 Requires at least: 4.4 5 Tested up to: 6. 25 Tested up to: 6.3 6 6 Requires PHP: 7.4 7 Stable tag: 2.4. 77 Stable tag: 2.4.8 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 90 90 * Fixd minor bug 91 91 = 2.4.7 = 92 * Updated widget UI 92 * Updated widget UI 93 = 2.4.8 = 94 * Initialized $environments, $configurationUrl & $orderurl variables to elimiate possible deprication warning. 95 * Added alert when refund is disabled. 96 * Added conditions for wordpress 6.2 and 6.3 to display widget using different hooks .
Note: See TracChangeset
for help on using the changeset viewer.