Plugin Directory

Changeset 2153032


Ignore:
Timestamp:
09/08/2019 01:49:27 PM (7 years ago)
Author:
alonezcount
Message:

add another error message for missing cookie

Location:
ezcount/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ezcount/trunk/EZcount.php

    r2152998 r2153032  
    44 * Plugin URI:
    55 * Description: invoicing, clearing and paypal integration plugin.
    6  * Version: 1.5.1
     6 * Version: 1.5.2
    77 * Author: EZcount
    88 * Author URI:
     
    297297            $order = new WC_Order($order_id);
    298298            $encryptedCookie = $_COOKIE['sti_' . $order_id];
     299            if (!$encryptedCookie) {
     300                $msg = "transaction cookie not exists, please check any configuration that can make this situation, \n
     301                        1. CORS configurations\n
     302                        2. SSL configurations\n
     303                        3. any other configuration or lib that can block a session cookie\n\n\n\n"
     304                    . json_encode([
     305                        '$order_id' => $order_id,
     306                        '$_COOKIE' => $_COOKIE,
     307                        '$_SERVER' => $_SERVER
     308                    ]);
     309                wp_mail($this->user_email, 'transaction cookie does not exists', $msg);
     310                echo "VALIDATION ERROR #1.5 לא הצלחנו לבצע אישור לסליקה, אבל יתכן והיא עברה, אנא צרו קשר עם בעל החנות";
     311                die();
     312            }
     313
    299314            //get the transaction_id from the cookie
    300315            $secretTransactionId = EZcount_helpers::decrypt($encryptedCookie, $zc_payment->get_option('api_key'));
     
    315330            //this is a valid request
    316331            if (!$result->success) {
    317                 $msg = "transaction validation failed, is your Cookies expiry are too short?\n\n" . json_encode($result);
     332                $msg = "transaction validation failed, is your Cookies expiry are too short?\n\n" . json_encode([
     333                        '$result' => $result,
     334                        'secretTransactionId' => $secretTransactionId,
     335                        'encryptedCookie' => $encryptedCookie,
     336                        '$_SERVER' => $_SERVER
     337                    ]);
    318338                wp_mail($this->user_email, 'Failed to create invoice', $msg);
    319339                echo "VALIDATION ERROR #3 הסליקה עברה אבל ההזמנה לא התקבלה,צרו קשר עם בעלי החנות";
     
    439459                    // reciept will include
    440460//                  "forceItemsIntoNonItemsDocument" => true,
    441                     // rebalance the values
     461                // rebalance the values
    442462//                  "auto_balance" => true,
    443                 );
     463            );
    444464
    445465            //invoice!
  • ezcount/trunk/readme.txt

    r2152998 r2153032  
    44Tags        : invoicing, clearing and paypal integration plugin.
    55Tested up to: 4.9.8
    6 Version     : 1.5.1
     6Version     : 1.5.2
    77Stable tag: trunk
    88Requires PHP: 5.4
Note: See TracChangeset for help on using the changeset viewer.