Plugin Directory

Changeset 3720550


Ignore:
Timestamp:
09/30/2026 07:30:56 AM (3 weeks ago)
Author:
whalet
Message:

本次插件改动:1. 后端字段调整,不在返回tradeUniId,前端wordpress插件和收银台关联需要tradeUniId字段,现在改成tradeUniId值从后端字段tradeId获取

Location:
whalet-payment/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • whalet-payment/trunk/admin/settings.php

    r3447036 r3720550  
    254254
    255255    // New Fields Defaults
    256     'cards_title' => __('Card Payment', 'whalet-payment'),
    257     'cards_description' => __('Pay with your credit or debit card; Secure and Fast', 'whalet-payment'),
     256    'cards_title' => 'Cards',
     257    'cards_description' => 'Fast and Secure Payment with Whalet Cards',
    258258    'cards_enabled' => 0,
    259259
    260     'local_title' => __('Whalet Pay', 'whalet-payment'),
    261     'local_description' => __('Pay via Whalet; Secure and Fast', 'whalet-payment'),
     260    'local_title' => 'Pay with cards and more',
     261    'local_description' => 'Fast and Secure Payment with Whalet',
    262262    'local_enabled' => 0,
    263263);
  • whalet-payment/trunk/assets/js/whalet-postmessage-init.js

    r3380114 r3720550  
    104104        .filter((method) => method.methodType === "Cards")
    105105        .map((method) => ({
    106           paymentMethod: method.methodCode,
     106          paymentMethod: method.methodCode,  // 这个字段相当于 网关接口端的 paymentMethodCode
    107107          paymentMethodType: method.methodType.toUpperCase(),
    108108          networks: [],
    109           brand: method.brand
     109          brand: method.brand,
     110          rawData: method?.rawData || {}
    110111        }));
    111112    }
  • whalet-payment/trunk/includes/handlers/class-whalet-config-processor.php

    r3447036 r3720550  
    101101                        'display_name' => $payment_method_key,
    102102                        'countries' => $method['country'],
    103                         'currencies' => $method['currency']
     103                        'currencies' => $method['currency'],
     104                        // rawData
     105                        'rawData' => $method,
    104106                    );
    105107                }
  • whalet-payment/trunk/includes/handlers/class-whalet-payment-processor.php

    r3447036 r3720550  
    292292            'order_id' => $order->order_id,
    293293            // tradeUniId 用于唯一标识支付交易 它是 $order->gateway_payment_url 的  /pay/ 后面的一段字符串,请你帮我获取 tradeUniId,直接使用 $tradeUniId
    294             'tradeUniId' => $tradeUniId,
     294            'tradeUniId' => $order->gateway_payment_id ?: $tradeUniId,
     295            'tradeId' => $order->gateway_payment_id,
     296            'linkUniId' => $tradeUniId,
    295297            // 从 metadata 中获取 email
    296298            'email' => $email,
    … …  
    371373            'amount' => $order_data['amount'],
    372374            'currency' => $order_data['currency'],
    373             'tradeUniId' => $gateway_result['tradeUniId'],
     375            'tradeUniId' => $gateway_result['tradeId'] ?? $gateway_result['tradeUniId'],
    374376            'email' => $gateway_result['customerEmail'],
    375377            'country' => $order_data['billingAddress']['country'],
  • whalet-payment/trunk/templates/whalet-checkout.php

    r3447036 r3720550  
    138138            scrolling="auto"
    139139            allow="payment"
     140            sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox"
    140141            src="<?php echo esc_url($gateway_payment_url) . '?isWooCommerce=true'; ?>"
    141142            >
  • whalet-payment/trunk/woocommerce/card/class-wc-gateway-card.php

    r3447036 r3720550  
    293293                scrolling="no"
    294294                id="whalet-card-iframe"
     295                sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox"
    295296                >
    296297              </iframe>';
Note: See TracChangeset for help on using the changeset viewer.