Plugin Directory

Changeset 3056684


Ignore:
Timestamp:
03/22/2024 09:57:09 AM (22 months ago)
Author:
geideapg123
Message:

Order Status updation fix

Location:
geidea-online-payments/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • geidea-online-payments/trunk/class.geidea.php

    r3040351 r3056684  
    88 * @class       WC_Geidea
    99 * @extends     WC_Payment_Gateway
    10  * @version     3.0.0
     10 * @version     3.0.1
    1111 * @author      Geidea
    1212 */
  • geidea-online-payments/trunk/functions/ReturnHandler.php

    r3040351 r3056684  
    6060                echo esc_html("Order with id " . $order["merchantReferenceId"] . " not found!");
    6161                http_response_code(404);
    62                 die();
    63             }
    64 
    65             //get the order amount
    66             global $wpdb;
    67             $order_total = 0;
    68             $orders_fields = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $wc_order->id));
    69             foreach ($orders_fields as $value) {
    70                 if ($value->meta_key != '_order_total') {
    71                     continue;
    72                 }
    73                 $order_total = $value->meta_value;
    74             }
    75 
    76             // checking on the order amount
    77             // FIX in case of BNPL amount will have added fee
    78             $transactions = $order['transactions'];
    79             foreach ($transactions as $transaction) {
    80                 if (isset($transaction['bnplDetails'])) {
    81                     $amount = $transaction['bnplDetails']['totalAmount'];
    82                 }
    83             }
    84             if (
    85                 number_format($order_total, 2, '.', '') != $amount &&
    86                 (empty($wc_order->get_status()) || $wc_order->get_status() != 'failed')
    87             ) {
    88                 echo esc_html("Invalid order amount!");
    89                 http_response_code(400);
    9062                die();
    9163            }
  • geidea-online-payments/trunk/readme.txt

    r3040351 r3056684  
    22
    33Contributors: geideapg123
    4 Version: 3.0.0
     4Version: 3.0.1
    55Tags: credit card, geidea, Apple Pay, payment, payment for WordPress, payment for woocommerce, payment request, woocommerce
    66Requires at least: 6.0.2
    77Tested up to: 6.4.2
    88Requires PHP: 7.4
    9 Stable tag: 3.0.0
     9Stable tag: 3.0.1
    1010License: GPLv3
    1111License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    200200= 3.0.0 - 2024-02-24 =
    201201* Security Fix
     202
     203= 3.0.1 - 2024-03-21 =
     204* Order Status updation fix
  • geidea-online-payments/trunk/wc-geidea.php

    r3040351 r3056684  
    44Plugin Name: Geidea Online Payments
    55Description: Geidea Online Payments.
    6 Version: 3.0.0
     6Version: 3.0.1
    77Author: Geidea
    88Author URI: https://geidea.net
Note: See TracChangeset for help on using the changeset viewer.