Plugin Directory

Changeset 3435631


Ignore:
Timestamp:
01/09/2026 05:37:29 AM (6 weeks ago)
Author:
fasspay
Message:

update readme file faq, version to 1.0.1
restrict to MYR currency
disabled logo and color update for sandbox environment.

Location:
fasspay-for-woocommerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fasspay-for-woocommerce/trunk/fasspay-for-woocommerce.php

    r3426395 r3435631  
    33 * Plugin Name: Fasspay for WooCommerce
    44 * Description: Accept payments via Fasspay gateway supporting JCB, Mydebit, FPX, Visa/Mastercard, DuitNow QR, and E-Wallet
    5  * Version: 1.0.0
     5 * Version: 1.0.1
    66 * Author: Fasspay
    77 * Author URI: https://fasspay.com
  • fasspay-for-woocommerce/trunk/includes/class-fasspay-gateway.php

    r3426395 r3435631  
    173173                ) . '<br/><button type="button" class="button fasspay-upload-logo">' . __('Upload Logo', 'fasspay-for-woocommerce') . '</button>' .
    174174                '<div class="fasspay-logo-container" style="margin-top:8px; position:relative; display:none;"><img class="fasspay-logo-preview" src="" style="max-height:50px; height:auto; width:auto; display:none; border:1px solid #ddd; padding:4px; background:#fff;"/>' .
    175                 '<button type="button" class="fasspay-remove-logo" style="display:none; position:absolute; top:-10px; right:-10px; background:#dc3232; color:#fff; border:none; border-radius:50%; width:20px; height:20px; cursor:pointer; font-size:12px; line-height:1; padding:0; box-shadow:0 1px 3px rgba(0,0,0,0.3); z-index:10;" title="' . __('Remove logo', 'fasspay-for-woocommerce') . '">×</button></div>',
     175                '<button type="button" class="fasspay-remove-logo" style="display:none; position:absolute; top:-10px; right:-10px; background:#dc3232; color:#fff; border:none; border-radius:50%; width:20px; height:20px; cursor:pointer; font-size:12px; line-height:1; padding:0; box-shadow:0 1px 3px rgba(0,0,0,0.3); z-index:10;" title="' . __('Remove logo', 'fasspay-for-woocommerce') . '">×</button></div>' .
     176                '<p style="margin-top:8px; color:#d63638; font-weight:500;"><em>' . __('Note: This setting only applies in Live/Production environment. It will be ignored in Sandbox/UAT mode.', 'fasspay-for-woocommerce') . '</em></p>',
    176177                'default' => '',
    177178                'desc_tip' => false,
     
    181182                'title' => __('Theme Color', 'fasspay-for-woocommerce'),
    182183                'type' => 'text',
    183                 'description' => __('Primary theme color (hex), e.g. #0055ff', 'fasspay-for-woocommerce'),
     184                'description' => __('Primary theme color (hex), e.g. #0055ff', 'fasspay-for-woocommerce') .
     185                    '<p style="margin-top:8px; color:#d63638; font-weight:500;"><em>' . __('Note: This setting only applies in Live/Production environment. It will be ignored in Sandbox/UAT mode.', 'fasspay-for-woocommerce') . '</em></p>',
    184186                'default' => '',
    185187                'css' => 'max-width:150px;',
     
    414416     */
    415417    private function maybe_send_white_label_update($logo_url, $theme_color) {
     418        // Skip white label update in sandbox/UAT environment
     419        if ($this->sandbox_mode === 'yes') {
     420            $this->log_to_debug('White label update skipped: Sandbox/UAT mode is enabled', 'info');
     421            return;
     422        }
    416423       
    417424        $max_bytes = 200 * 1024; // 200 KB
     
    459466
    460467    /**
     468     * Check if this gateway is available for use
     469     * Restricts gateway to MYR currency only
     470     */
     471    public function is_available() {
     472        // First check if gateway is enabled
     473        if ($this->enabled !== 'yes') {
     474            return false;
     475        }
     476
     477        // Check if currency is MYR
     478        $currency = get_woocommerce_currency();
     479        if ($currency !== 'MYR') {
     480            return false;
     481        }
     482
     483        // Call parent method for any additional checks
     484        return parent::is_available();
     485    }
     486
     487    /**
    461488     * Payment form on checkout page
    462489     */
     
    505532
    506533        if (!$order) {
     534            return array(
     535                'result' => 'fail',
     536                'redirect' => ''
     537            );
     538        }
     539
     540        // Validate currency is MYR (safety check)
     541        $currency = $order->get_currency();
     542        if ($currency !== 'MYR') {
     543            $this->log_to_debug('Payment rejected: Currency must be MYR, but order currency is ' . $currency, 'error');
     544            wc_add_notice(
     545                sprintf(
     546                    /* translators: %s: Currency code */
     547                    __('Fasspay only accepts MYR currency. Your order is in %s. Please change your store currency to MYR.', 'fasspay-for-woocommerce'),
     548                    esc_html($currency)
     549                ),
     550                'error'
     551            );
    507552            return array(
    508553                'result' => 'fail',
  • fasspay-for-woocommerce/trunk/readme.txt

    r3426395 r3435631  
    44Requires at least: 6.7
    55Tested up to: 6.9
    6 Stable tag: 1.0.0
     6Stable tag: 1.0.1
    77Requires PHP: 7.4
    88WC requires at least: 5.0
     
    7979The plugin automatically handles webhook callbacks from Fasspay with authentication in placed for security. Webhooks are processed to update order status automatically.
    8080
     81= Why are the brand logo and theme colors not reflecting on the payment page?
     82
     83The brand logo and theme colors will not be applied in the sandbox environment. Do uncheck the sandbox mode and try it in the Production environment.
     84
    8185== Screenshots ==
    8286
    83 1. Checkout payment method selection with brand icons
    84 2. Payment gateway configuration in WooCommerce settings
    85 3. Fasspay admin settings page with environment info and test connection tool
    86 
     871. Fasspay payment gateway configuration in WooCommerce settings.
     882. Fasspay payment gateway configuration in WooCommerce settings.
     893. WooCommerce > Fasspay, here is the admin settings page with environment info and test connection tool.
     904. Payment checkout page.
    8791
    8892== Changelog ==
     93
     94= 1.0.1 =
     95- Enhanced payment gateway configuration.
     96- Restricted transactions to MYR currency.
    8997
    9098= 1.0.0 =
Note: See TracChangeset for help on using the changeset viewer.