Plugin Directory

Changeset 3211948


Ignore:
Timestamp:
12/23/2024 01:06:15 AM (16 months ago)
Author:
hasanayoub
Message:
  • fixed bug of fields lengths.
Location:
paylink/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • paylink/trunk/includes/class-wc-gateway-paylink.php

    r3207149 r3211948  
    66 * @class       WC_Gateway_Paylink
    77 * @extends     WC_Payment_Gateway
    8  * @version     3.0.6
     8 * @version     3.0.7
    99 * @package     WooCommerce\Classes\Payment
    1010 */
     
    1616    private string $callback_url;       // The URL where Paylink will send the payment status callback.
    1717    private string $card_brands;         // The card brands to use for the payment.
    18     private bool   $display_thank_you;  // Display a Thank you page before redirecting to the Paylink payment page.
     18    private bool $display_thank_you;  // Display a Thank you page before redirecting to the Paylink payment page.
    1919    private string $instructions;       // Gateway instructions that will be added to the thank you page and emails.
    2020    private string $fail_msg;           // The error message that appears to the user if the payment fails.
    21     private bool   $test_mode;          // Enable Test Mode.
     21    private bool $test_mode;          // Enable Test Mode.
    2222
    2323    // General properties
     
    9696    protected function setup_properties()
    9797    {
    98         $this->id                 = 'paylink';
    99         $this->icon               = apply_filters('woocommerce_paylink_icon', plugins_url('../assets/icon.min.png', __FILE__));
    100         $this->method_title       = __('Paylink Payment Gateway', 'paylink');
     98        $this->id = 'paylink';
     99        $this->icon = apply_filters('woocommerce_paylink_icon', plugins_url('../assets/icon.min.png', __FILE__));
     100        $this->method_title = __('Paylink Payment Gateway', 'paylink');
    101101        $this->method_description = __("Paylink payment gateway for WooCommerce, It provides your customers with the popular payment methods in the Kingdom of Saudi Arabia, such as", 'paylink') . ' ' . self::_get_valid_card_brands_string();
    102         $this->has_fields         = false;
     102        $this->has_fields = false;
    103103    }
    104104
    105105    // ---------------------------------- inheritdoc Methods ----------------------------------
     106
    106107    /**
    107108     * {@inheritdoc}
     
    223224            // Return thankyou redirect.
    224225            return array(
    225                 'result'   => 'success',
     226                'result' => 'success',
    226227                'redirect' => add_query_arg('order-pay', $order->get_id(), add_query_arg('key', $order->get_order_key(), $checkout_payment_url)),
    227228            );
     
    383384            foreach ($items as $item) {
    384385                $product = $item->get_product();
     386
     387                $description = $product->get_description();
     388                $title = $product->get_name();
     389
     390                // Ensure the description does not exceed 4000 characters
     391                if (strlen($description) > 3900) {
     392                    $description = substr($description, 0, 3900);
     393                }
     394
     395                if (strlen($title) > 250) {
     396                    $title = substr($title, 0, 250);
     397                }
     398
     399
    385400                $products[] = [
    386                     'title' => $product->get_name(),
     401                    'title' => $title,
    387402                    'price' => $product->get_price(),
    388403                    'qty' => $item->get_quantity(),
    389                     'description' => $product->get_description(),
     404                    'description' => $description,
    390405                    'isDigital' => 'false',
    391406//                    'isDigital' => $product->is_virtual(),
  • paylink/trunk/paylink.php

    r3207149 r3211948  
    1111 * Author URI:  https://paylink.sa
    1212 * Description: Use this woocommerce payment gateway plugin to enable clients of your store to pay using Paylink gateway.
    13  * Version:     3.0.6
     13 * Version:     3.0.7
    1414 * License:     GPL-2.0+
    1515 * License URL: http://www.gnu.org/licenses/gpl-2.0.txt
  • paylink/trunk/readme.txt

    r3207149 r3211948  
    44Tested up to: 6.7.1
    55Requires PHP: 7.0
    6 Stable tag: 3.0.6
     6Stable tag: 3.0.7
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.