Plugin Directory

Changeset 2262063


Ignore:
Timestamp:
03/16/2020 10:29:17 PM (6 years ago)
Author:
kunlexzy
Message:

Version 1.5.4

Location:
woo-voguepay/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • woo-voguepay/trunk/README.txt

    r2223926 r2262063  
    6262
    6363== Changelog ==
     64= 1.5.4 =
     65* Fixed cloudflare issue with transaction callback
     66* Transaction status now updates while using local server
    6467= 1.5.0 =
    6568* Inline payment minor bug fixed
  • woo-voguepay/trunk/includes/class.voguepay.php

    r2121042 r2262063  
    1919        $this->method_title         = 'VoguePay';
    2020        $this->method_description   = __('Voguepay provide services for to accept online payments from local and international customers using Mastercard, Visa, Verve Cards and other payment options', 'woo-voguepay-lang');
     21
     22        //On return page, attempt to requery incase callback failed
     23        if(isset($_POST['transaction_id']) && isset($_GET['key']))
     24        {
     25           $res = wp_remote_post( $this->notify_url, ['body'=>$_POST] );
     26        }
    2127
    2228        // Load the form fields.
     
    431437            $transaction_id = $transaction['transaction_id'];
    432438            $ref_split      = explode('-', $transaction['merchant_ref'] );
    433            
    434            
     439
    435440            $order_id       = (int) $ref_split[0];
    436441
    437442            $order          = wc_get_order($order_id);
    438443            $order_total    = $order->get_total();
     444
     445            if(count($order->get_data()['meta_data'])>2) {
     446                 if($transaction_id ==  $order->get_data()['meta_data'][2]->get_data()['value']) {
     447                    echo "Callback already processed";
     448                    die();
     449                }
     450            }
     451            if($transaction_id == $order->data['transaction_id']) {
     452                echo "Callback already processed";
     453                die();
     454            }
    439455
    440456            $amount_paid_currency   = $ref_split[1];
     
    466482                    echo 'Merchant ID mis-match';
    467483
    468                 } else {
     484                }
     485                else {
    469486
    470487                    // check if the amount paid is equal to the order amount.
     
    491508                        echo 'Total amount mis-match';
    492509
    493                     } else {
     510                    }
     511                    else {
    494512
    495513                        $order->payment_complete( $transaction_id );
     
    517535
    518536
    519             } else {
     537            }
     538            else {
    520539
    521540                $message = __('Payment failed', 'woo-voguepay-lang');
  • woo-voguepay/trunk/woo-voguepay.php

    r2121042 r2262063  
    1010 * Plugin URI:  https://wordpress.org/plugins/woo-voguepay/
    1111 * Description: VoguePay plugin for WooCommerce.
    12  * Version:     1.5.2
     12 * Version:     1.5.4
    1313 * Author:      kunlexzy
    1414 * Author URI:  https://voguepay.com/3445-0056682
Note: See TracChangeset for help on using the changeset viewer.