Plugin Directory

Changeset 3136445


Ignore:
Timestamp:
08/16/2024 06:29:19 AM (20 months ago)
Author:
boldpay
Message:

Bug fix

  • blank screen after payment
  • duplicate order notes
Location:
bold-pay
Files:
15 added
2 edited

Legend:

Unmodified
Added
Removed
  • bold-pay/trunk/readme.txt

    r3122840 r3136445  
    22Tags: Payment Gateway, Online Banking, e-wallet, payment request, credit card, grabpay, boost, boostpay, touch n go, touchngo, secured, debit card, card, direct carrier billing, multi channel payment, payment plugin, free, MACROKIOSK
    33Requires at least: 5.2.1
    4 Tested up to: 6.5.5
     4Tested up to: 6.6.1
    55WooCommerce requires at least: 2.6.0
    6 WooCommerce tested up to: 9.0.2
    7 Stable tag: 1.5.7
     6WooCommerce tested up to: 9.1.4
     7Stable tag: 1.5.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • bold-pay/trunk/src/boldpay.php

    r3122840 r3136445  
    218218                        $query_request_url .= '&CallBackUrl=' .urlencode(esc_url_raw( $this->callbackurl ));
    219219
     220                        if ($is_callback) {
     221                            sleep(2);
     222                        }
     223
    220224                        # Initialize cURL
    221225                        $ch = curl_init();
     
    262266                            }
    263267                        }
     268                        else if ( strtolower( $query['Status'] ) == 'pending' ) {
     269                            # only update if order is pending or failed or on-hold
     270                            if ( strtolower( $order->get_status() ) == 'pending' || strtolower( $order->get_status() ) == 'failed' || strtolower( $order->get_status() ) == 'on-hold' ) {
     271                                   
     272                                $order->update_status( 'on-hold' );                             
     273                                $order->add_order_note( 'Payment pending made through BOLD.Pay. Transaction ID is ' . sanitize_text_field( $_REQUEST['TransactionID'] ));
     274                               
     275                                if ( $is_callback ) {
     276                                    echo 'OK';
     277                                } else {
     278                                    # redirect to order receive page
     279                                    wp_redirect( $order->get_checkout_order_received_url() );
     280                                }
     281
     282                                exit();
     283                            }
     284                        }
    264285
    265286                    } else if ( strtoupper(sanitize_text_field( $_REQUEST['Status'] )) == 'PENDING' ) {
Note: See TracChangeset for help on using the changeset viewer.