Plugin Directory

Changeset 3423207


Ignore:
Timestamp:
12/18/2025 07:35:26 PM (4 months ago)
Author:
primersoftware
Message:

Update

Location:
primer-mydata
Files:
2167 added
5 edited

Legend:

Unmodified
Added
Removed
  • primer-mydata/trunk/README.txt

    r3421726 r3423207  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 4.2.9
     7Stable tag: 4.3.0
    88License: GPLv2
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7373
    7474== Changelog ==
     75= 4.3.0 - 2025-12-18 =
     76* Minor bug fixes.
    7577= 4.2.9 - 2025-12-17 =
    7678* Minor bug fixes.
  • primer-mydata/trunk/includes/class-primer-cron.php

    r3421726 r3423207  
    15071507
    15081508                    if (is_wp_error($response)) {
    1509                         $response_data             .= spintf($error_messages['error_notice_template'], $response->get_error_message());
     1509                        $response_data             .= sprintf($error_messages['error_notice_template'], $response->get_error_message());
    15101510                        $receipt_log_value_array[] = $response->get_error_message();
    15111511                    }
     
    20192019    private function build_receipt_query_args($export_config) {
    20202020        $mydata_options = get_option('primer_mydata');
    2021         $search_api     = $mydata_options['mydata_api'] == 'production' ? 'production' : 'test';
     2021        $search_api     = $mydata_options['mydata_api'] == 'production_api' ? 'production' : 'test';
    20222022
    20232023        $receipt_args = array(
     
    25122512        }
    25132513
    2514 
    2515 
    25162514        return apply_filters('primer_export_csv_data', $data_rows);
    25172515    }
     
    25402538
    25412539        $response = $this->send_export_response($file_path, $filename, $export_config, $primer_export_data);
     2540
    25422541        wp_die($response);
    25432542    }
     
    25702569                    continue;
    25712570                }
     2571
    25722572                $value = $data_items[$col_letter] ?? '';
    25732573
     
    25822582                    $cleaned_value = str_replace(',', '', $value);
    25832583                    $numeric_value = is_numeric($cleaned_value) ? (float)$cleaned_value : 0.0;
     2584
    25842585                    if ($value === '' || $value === null || $numeric_value === 0.0) {
    25852586                        $sheet->setCellValue($cell, ' ');
  • primer-mydata/trunk/payments/class-primer-payment-gateway.php

    r3421726 r3423207  
    88
    99$payment_switch = false;
    10 
    11 
    1210
    1311if ($payment_switch) {
  • primer-mydata/trunk/payments/includes/class-primer-payments-gateway-functions.php

    r3421726 r3423207  
    3030        global $woocommerce;
    3131        global $wpdb;
    32 
    33         $SupportReferenceID = "";
    34         $TransactionID = "";
    3532
    3633        $order = wc_get_order($order_id);
     
    166163
    167164        $currency          = get_woocommerce_currency();
    168         $currencyCode      = array(
    169                 'ALL' => "008",
    170                 'AUD' => "036",
    171                 'CAD' => "124",
    172                 'CNY' => "156",
    173                 'HRK' => "191",
    174                 'CZK' => "203",
    175                 'DKK' => "208",
    176                 'INR' => "356",
    177                 'ILS' => "376",
    178                 'NOK' => "578",
    179                 'RUB' => "643",
    180                 'SEK' => "752",
    181                 'CHF' => "756",
    182                 'EGP' => "818",
    183                 'GBP' => "826",
    184                 'USD' => "840",
    185                 'RSD' => "941",
    186                 'RON' => "946",
    187                 'TRY' => "949",
    188                 'BGN' => "975",
    189                 'EUR' => "978",
    190                 'UAH' => "980",
    191                 'PLN' => "985",
    192                 'BRL' => "986",
    193                 'AED' => "784",
    194                 'ARS' => "032",
    195                 'BYR' => "974",
    196                 'CLP' => "152",
    197                 'COP' => "170"
    198         );
     165        $currencyCode      = array('ALL' => "008", 'AUD' => "036", 'CAD' => "124", 'CNY' => "156", 'HRK' => "191", 'CZK' => "203", 'DKK' => "208", 'INR' => "356", 'ILS' => "376", 'NOK' => "578", 'RUB' => "643", 'SEK' => "752", 'CHF' => "756", 'EGP' => "818", 'GBP' => "826", 'USD' => "840", 'RSD' => "941", 'RON' => "946", 'TRY' => "949", 'BGN' => "975", 'EUR' => "978", 'UAH' => "980", 'PLN' => "985", 'BRL' => "986", 'AED' => "784", 'ARS' => "032", 'BYR' => "974", 'CLP' => "152", 'COP' => "170");
    199166        $MerchantReference = uniqid("$order_id-");
    200 
    201167
    202168        try {
     
    336302                $error_message     = __('Result code', 'primer') . 'code: ' . $resultCode . 'description: ' . $resultDescription;
    337303
    338                 if ($resultCode == 1040 || $resultCode == 1041) {
    339                     $error_message = __('Error validating IP address', 'primer');
    340                 } elseif ($resultCode == 100) {
    341                     $error_message = __('Authentication Error. Wrong username or/and password', 'primer');
    342                 } elseif ($resultCode == 1003) {
    343                     $error_message = __('Wrong merchant ID', 'primer');
    344                 } elseif ($resultCode == 1019) {
    345                     $error_message = __('Too many installments asked.', 'primer');
    346                 } elseif ($resultCode == 1045) {
    347                     $error_message = __('Duplicate transaction references are not allowed.', 'primer');
    348                 } elseif ($resultCode == 1048) {
    349                     $error_message = __('Transaction already processed and completed', 'primer');
    350                 } elseif ($resultCode == 1802) {
    351                     $error_message = __('Wrong amount value', 'primer');
    352                 } elseif ($resultCode == 500 || $resultCode == 501) {
    353                     $error_message = __('Communication problem with the transaction processing system', 'primer');
    354                 }
     304                $error_messages = [
     305                    1    => __('An error occurred. Technical Problem. Please check your data or else contact epay eCommerce administrator', 'primer'),
     306                    05   => __('Declined', 'primer'),
     307                    12   => __('Declined', 'primer'),
     308                    51   => __('Declined', 'primer'),
     309                    34   => __('Lost card Stolen card, pick-up', 'primer'),
     310                    43   => __('Lost card Stolen card, pick-up', 'primer'),
     311                    54   => __('Expired card', 'primer'),
     312                    62   => __('Restricted Card', 'primer'),
     313                    92   => __('Declined. Try again later.', 'primer'),
     314                    100  => __('Authentication Error. Wrong username or/and password', 'primer'),
     315                    130  => __('Fields contains invalid characters', 'primer'),
     316                    151  => __('Check fields contains data. No value is send', 'primer'),
     317                    215  => __('AMEX cards require 4 digit cvv2', 'primer'),
     318                    216  => __('Wrong cvv2', 'primer'),
     319                    500  => __('Communication problem with the transaction processing system', 'primer'),
     320                    501  => __('Communication problem with the transaction processing system', 'primer'),
     321                    981  => __('Invalid Card number/Exp Month/Exp Year', 'primer'),
     322                    1006 => __('Unknown BIN', 'primer'),
     323                    1007 => __('Merchant does not support given bin', 'primer'),
     324                    1010 => __('Wrong original transaction', 'primer'),
     325                    1012 => __('Original transaction already settled, or being settled', 'primer'),
     326                    1014 => __('Refunding amount cannot exceed remaining amount of the original transaction', 'primer'),
     327                    1017 => __('Preorder date has expired', 'primer'),
     328                    1019 => __('Too many installments asked', 'primer'),
     329                    1026 => __('Merchant does not support instalments', 'primer'),
     330                    1034 => __('Terminal does not support given card type', 'primer'),
     331                    1040 => __('Error validating IP address. Contact sysadmin', 'primer'),
     332                    1041 => __('Invalid IP address.', 'primer'),
     333                    1042 => __('Refund maximum allowed period exceeded', 'primer'),
     334                    1045 => __('Duplicate transaction references are not allowed', 'primer'),
     335                    1048 => __('Transaction already processed and completed', 'primer'),
     336                    1072 => __('Pack is still closing', 'primer'),
     337                    1802 => __('Wrong amount value', 'primer'),
     338                    7001 => __('Error', 'primer'),
     339                    9150 => __('Wallet transaction in request message is not supported', 'primer'),
     340                    9151 => __('Wrong FundsTransfer Parameters', 'primer'),
     341                    9152 => __('FundsTranfer in request message is not supported', 'primer'),
     342                    9156 => __('Transaction Type in request message is not supported', 'primer'),
     343                    9153 => __('Loyalty is not supported for FundsTranfer', 'primer'),
     344                    9154 => __('Installments are not supported for FundsTranfer', 'primer'),
     345                    9155 => __('Recurring Transactions are not supported for FundsTranfer', 'primer'),
     346                    9158 => __('Account Verification is not supported for Amex cards', 'primer'),
     347                    9159 => __('Installments are not supported for Amex cards', 'primer'),
     348                    1003 => __('Wrong merchant ID', 'primer'),
     349                ];
     350                $error_message = $error_messages[$resultCode] ?? '';
     351
    355352
    356353//                $order->add_order_note($error_message . __('Payment Via Peiraeus Bank', 'primer-woocommerce-piraeus-payment-gateway') . '<br />MerchantReference: ' . $MerchantReference . ', SupportReferenceID: ' . $SupportReferenceID . ', Transaction ID: ' . $TransactionID);
     
    762759        $payment_method = $order->get_payment_method_title() ?: 'N/A';
    763760
    764         $html = $iframe_src = '';
    765 
    766         $iframe_src = $iframe;
    767 
     761        $html = '';
    768762        $html .= get_header();
    769763        $html .= '<div id="primer-modal" class="primer-modal primer-modal-3d no-select">
     
    808802                            </div>
    809803                        </div>
    810                         <iframe hidden="hidden" id="showAcs" ' . $iframe_src . '</iframe>
     804                        <iframe hidden="hidden" id="showAcs" ' . $iframe . '</iframe>
    811805                    </div>
    812806                 </div>';
     
    11141108        $wc_token    = \WC_Payment_Tokens::get($wc_token_id);
    11151109
     1110
     1111        // Work here.
    11161112        if ($wc_token) {
    11171113            $token    = explode('-', $wc_token->get_token());
  • primer-mydata/trunk/primer.php

    r3421726 r3423207  
    1818 * Plugin URI:        primer.gr/plugin/
    1919 * Description:       Issue receipts and invoices with woocommerce.
    20  * Version:           4.2.9
     20 * Version:           4.3.0
    2121 * Author:            Primer Software
    2222 * Author URI:        primer.gr
     
    3434 * Rename this for your plugin and update it as you release new versions.
    3535 */
    36 define( 'PRIMER_VERSION', '4.2.9');
     36define( 'PRIMER_VERSION', '4.3.0');
    3737define( 'PRIMER_NAME', 'Primer MyData' );
    3838
Note: See TracChangeset for help on using the changeset viewer.