• Resolved bgtsgammu

    (@bgtsgammu)


    I recently installed the Nhooja Himalayan Bank Payment plugin and would appreciate some guidance on how to set it up and use it properly. Specifically, I would like to understand:

    • How to configure the plugin settings
    • What credentials or API keys are needed from Himalayan Bank
    • How the payment process works for users
    • Any documentation or step-by-step guide available

    Could you please provide instructions or point me to any relevant documentation or support resources?

    Thank you in advance for your help!

    Best regards,
    Bijaya Gamuwa Tharu

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Sachit Tandukar

    (@sachittandukar)

    Hi @bgtsgammu

    Thank you for your interest in the Himalayan Bank Payment Gateway plugin. Below are answers to your questions, based on the plugin details and FAQs:

    1. How to configure the plugin settings

    Once you’ve installed and activated the plugin:

    • Go to your WordPress Dashboard → WooCommerce → Settings → Payments
    • Locate Himalayan Bank Payment Gateway in the list of available payment methods.
    • Click “Manage” to open the settings page.
    • Fill in the required fields such as:
      • Merchant ID
      • Encryption Key
      • Access Token
      • Toggle the Test Mode if you’re using a test account.
      • Turn off 3D Secure if you are using test mode
    • Click Save Changes to apply the configuration.

    2. What credentials or API keys are needed from Himalayan Bank

    To use this plugin, you’ll need to contact Himalayan Bank and request access to their HBL eCommerce Payment Gateway. Specifically, you will need the following credentials from the bank:

    • Merchant ID
    • Encryption Key
    • Access Token
    • PACO Signing Public Key
    • PACO Encryption Public Key

    These credentials are unique to your business and are required to connect your site to the bank’s secure payment system.

    3. RSA Key Generation (Required)

    The plugin requires RSA encryption for secure communication with the bank. Follow these steps: 🔐 Generate your RSA Key Pair:

    Use this tool:
    👉 https://www.devglan.com/online-tools/rsa-encryption-decryption

    1. Generate two key pairs:
      • Merchant Encryption Key Pair
      • Merchant Signing Key Pair
    2. Keep the Private Keys securely and paste them in the corresponding fields in the plugin settings.
    3. Send the Public Keys (encryption and signing) to Himalayan Bank.

    This allows secure two-way encryption and signing of transaction data.

    5. How the payment process works for users

    Here’s how the user payment flow works:

    1. A customer selects items and proceeds to checkout on your WooCommerce site.
    2. On the checkout page, they select Himalayan Bank (HBL) Payment.
    3. Upon submitting the order, they are redirected to the HBL Payment Gateway.
    4. The customer enters their card details and completes the payment on HBL’s secure page.
    5. After payment, the user is redirected back to your website with confirmation of the transaction.
    6. The WooCommerce order status is updated accordingly based on the payment result (e.g., success or failure).

    6. Any documentation or step-by-step guide available

    At the moment, detailed external documentation is not listed directly on the plugin page. However, the setup is straightforward and covered under the FAQ section on the plugin page.

    I’ve followed the steps shown here and it is not working. I am working with HBL to try and get it functioning but they are also unsure. I am receiving no errors on dev console, only “Oops! Something went wrong with your payment.”
    It’s not in test mode and all the configurations seem right. The issue persists despite removing all plugins but woocommerce, reverting theme to default and clearing all custom css. I have tried reverting to slightly earlier php versions with no success.
    only one slightly relevant error in debug.log

    “PHP Deprecated: Return type of Carbon\Traits\Date::createFromTimestamp($timestamp, $tz = null) should either be compatible with DateTime::createFromTimestamp(int|float $timestamp): static, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/customer/www/kailashblades.com/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php on line 29”

    Is this plugin currently working okay for other installations? Or perhaps it is out of date?

    Plugin Author Sachit Tandukar

    (@sachittandukar)

    Hi @fugglesby

    Plugin is still working for all other installations.

    “PHP Deprecated: Return type of Carbon\Traits\Date::createFromTimestamp($timestamp, $tz = null) should either be compatible with DateTime::createFromTimestamp(int|float $timestamp): static, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/customer/www/kailashblades.com/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php on line 29”

    It is deprecation notice. Not an error.

    Make sure you are running website in PHP 8.2 or above

    Hey there Sachit- thanks very much for your reply 🙂
    We are in PHP 8.4.7. all plugin configurations have been triple checked
    Can you provide any advice on why I might be getting this error?
    I have taken the website out of maintenance mode for you- if you’d like to take a look it would be greatly appreciated.

    other info:

    The page received a success on ?wc-ajax=update_order_review
    and then a failure on ?wc-ajax=checkout

    Request call stack

    1. send@jquery.min.js?ver=3.7.1:2ajax@jquery.min.js?ver=3.7.1:2(anonymous)@jquery-migrate.min.js?ver=3.4.1:2e.<computed>@jquery-migrate.min.js?ver=3.4.1:2submit@checkout.min.js?ver=9.9.3:1dispatch@jquery.min.js?ver=3.7.1:2v.handle@jquery.min.js?ver=3.7.1:2
    1. Request initiator chain
      1. https://kailashblades.com/checkout/
        1. https://kailashblades.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1
          1. https://kailashblades.com/?wc-ajax=checkout

    Have found some logs in wc-logs regarding this plugin:

    2025-07-01T10:52:03+00:00 ERROR Unable to load the key.
    2025-07-01T10:52:03+00:00 ERROR #0 /home/customer/www/kailashblades.com/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/vendor/web-token/jwt-framework/src/Component/KeyManagement/KeyConverter/KeyConverter.php(133): Jose\Component\KeyManagement\KeyConverter\KeyConverter::loadKeyFromPEM(‘—–BEGIN RSA …’, NULL) 1 /home/customer/www/kailashblades.com/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/vendor/web-token/jwt-framework/src/Component/KeyManagement/JWKFactory.php(308): Jose\Component\KeyManagement\KeyConverter\KeyConverter::loadFromKey(‘—–BEGIN RSA …’, NULL) 2 /home/customer/www/kailashblades.com/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/src/ActionRequest.php(186): Jose\Component\KeyManagement\JWKFactory::createFromKey(‘—–BEGIN RSA …’, NULL, Array) 3 /home/customer/www/kailashblades.com/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/src/Payment.php(129): Nexhbp\HimalayanBank\ActionRequest->GetPrivateKey(‘—–BEGIN RSA …’) 4 /home/customer/www/kailashblades.com/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/nexhbp-himalayan-bank-payment-gateway.php(386): Nexhbp\HimalayanBank\Payment->ExecuteFormJose(13993, ‘USD’, ’67’, ‘Y’, ‘https://kailash…&#8217;, ‘https://kailash…&#8217;, ‘https://kailash…&#8217;, ‘https://kailash…&#8217;, Array) 5 /home/customer/www/kailashblades.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1085): Nexhbp_Himalayan_Bank_Payment_Gateway->process_payment(13993) 6 /home/customer/www/kailashblades.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1370): WC_Checkout->process_order_payment(13993, ‘nexhbp_himalaya…’) 7 /home/customer/www/kailashblades.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(541): WC_Checkout->process_checkout() 8 /home/customer/www/kailashblades.com/public_html/wp-includes/class-wp-hook.php(324): WC_AJAX::checkout(”) 9 /home/customer/www/kailashblades.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 10 /home/customer/www/kailashblades.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 11 /home/customer/www/kailashblades.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(114): do_action(‘wc_ajax_checkou…’) 12 /home/customer/www/kailashblades.com/public_html/wp-includes/class-wp-hook.php(324): WC_AJAX::do_wc_ajax(”) 13 /home/customer/www/kailashblades.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(false, Array) 14 /home/customer/www/kailashblades.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 15 /home/customer/www/kailashblades.com/public_html/wp-includes/template-loader.php(13): do_action(‘template_redire…’) 16 /home/customer/www/kailashblades.com/public_html/wp-blog-header.php(19): require_once(‘/home/customer/…’) 17 /home/customer/www/kailashblades.com/public_html/index.php(17): require(‘/home/customer/…’) 18 {main}

    Aside from this suggesting the keys are the issue can you clarify what keys or in which manner they are failing? Himalayan Bank Tech support need all the help they can get :S

    Thanks very much for your time,
    Andrew

    Managed to get another HBL payment gateway plugin working. Moving those identical configuration details over to this one didn’t get this one working- hopefully this info helps troubleshoot problems in future 🙂

    Plugin Author Sachit Tandukar

    (@sachittandukar)

    Hi @fugglesby

    Thank you for the update, and I really appreciate you taking the time to test things and share your findings!

    It’s helpful to know that you got another HBL payment gateway plugin working using the same configuration details. Since our plugin is working fine on other websites, this might point to likely configuration issues.

    I’m also about to share a screenshot of the configuration that works on another site (with sensitive keys redacted), which might help spot any subtle differences.

    https://ibb.co/mQyp7MH

    Please note:

    • The Encryption Key (starts with 19f84b5655f04 …….),
    • PACO Signing Public Key (starts with MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAr0XW6QacR8GilY4nZrJZW40wnFeYu7h9aXUSqxCP6djurCW …………………………………) , and
    • PACO Encryption Public Key (starts with MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA6ZLups2K0iYEMxQqgASX8gY6tWhNVCp08YuDgjCsOVrGVgUHD0dh0TWFNJ7Lq2Jp0SOsGgi54+hrjwPOL2 …………………………………..)
    • Make sure 3D Secure is enabled
    • Make sure Test Mode is disabled

    …are the same for all accounts.

    However, your Merchant Signing and Encryption Public/Private Keys are generated by you.
    Once you provide those keys to HBL, they will provide your Merchant ID and Access Token.

    Thanks again for your message and for helping improve the plugin! 😊

    nepaladventuretrail

    (@nepaladventuretrail)

    2025-11-28T03:56:41+00:00 Error Unable to load the key. 2025-11-28T03:56:41+00:00 Error #0 /home2/gzzmpcmy/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/vendor/web-token/jwt-framework/src/Component/KeyManagement/KeyConverter/KeyConverter.php(133): Jose\Component\KeyManagement\KeyConverter\KeyConverter::loadKeyFromPEM(‘—–BEGIN RSA …’, NULL) #1 /home2/gzzmpcmy/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/vendor/web-token/jwt-framework/src/Component/KeyManagement/JWKFactory.php(308): Jose\Component\KeyManagement\KeyConverter\KeyConverter::loadFromKey(‘—–BEGIN RSA …’, NULL) #2 /home2/gzzmpcmy/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/src/ActionRequest.php(186): Jose\Component\KeyManagement\JWKFactory::createFromKey(‘—–BEGIN RSA …’, NULL, Array) #3 /home2/gzzmpcmy/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/src/Payment.php(129): Nexhbp\HimalayanBank\ActionRequest->GetPrivateKey(‘—–BEGIN RSA …’) #4 /home2/gzzmpcmy/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/nexhbp-himalayan-bank-payment-gateway.php(386): Nexhbp\HimalayanBank\Payment->ExecuteFormJose(10987, ‘USD’, ‘1380.00’, ‘N’, ‘https://nepalad…&#8217;, ‘https://nepalad…&#8217;, ‘https://nepalad…&#8217;, ‘https://nepalad…&#8217;, Array) #5 /home2/gzzmpcmy/public_html/wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(478): Nexhbp_Himalayan_Bank_Payment_Gateway->process_payment(10987) #6 /home2/gzzmpcmy/public_html/wp-includes/class-wp-hook.php(324): WC_Form_Handler::pay_action(Object(WP)) #7 /home2/gzzmpcmy/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #8 /home2/gzzmpcmy/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #9 /home2/gzzmpcmy/public_html/wp-includes/class-wp.php(835): do_action_ref_array(‘wp’, Array) #10 /home2/gzzmpcmy/public_html/wp-includes/functions.php(1342): WP->main(”) #11 /home2/gzzmpcmy/public_html/wp-blog-header.php(16): wp() #12 /home2/gzzmpcmy/public_html/index.php(17): require(‘/home2/gzzmpcmy…’) #13 {main} 2025-11-28T04:07:38+00:00 Error Unable to load the key. 2025-11-28T04:07:38+00:00 Error #0 /home2/gzzmpcmy/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/vendor/web-token/jwt-framework/src/Component/KeyManagement/KeyConverter/KeyConverter.php(133): Jose\Component\KeyManagement\KeyConverter\KeyConverter::loadKeyFromPEM(‘—–BEGIN RSA …’, NULL) #1 /home2/gzzmpcmy/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/vendor/web-token/jwt-framework/src/Component/KeyManagement/JWKFactory.php(308): Jose\Component\KeyManagement\KeyConverter\KeyConverter::loadFromKey(‘—–BEGIN RSA …’, NULL)

    Plugin Author Sachit Tandukar

    (@sachittandukar)

    @nepaladventuretrail

    These are most likely caused for the error:

    1. Missing or empty key (most likely).
    2. Key already includes PEM headers. If the stored key already has —–BEGIN RSA PRIVATE KEY—– and —–END RSA PRIVATE KEY—–, it gets double-wrapped, which is invalid. Enter key without any headers: —–BEGIN RSA PRIVATE KEY—–  and —–END RSA PRIVATE KEY—–
    3. The key may be truncated or contain invalid characters.

    .

    nepaladventuretrail

    (@nepaladventuretrail)

    Getting errors in test mode. how to fix it?

    2025-12-04T05:02:38+00:00
    Error Client error: POST https://core.demo-paco.2c2p.com/api/1.0/Payment/prePaymentUi resulted in a 400 Bad Request response 2025-12-04T05:02:38+00:00 Error #0 /home2/gzzmpcmy/public_html/wp-content/plugins/nexhbp-himalayan-bank-payment-gateway/vendor/guzzlehttp/guzzle/src/Middleware.php(72): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response), NULL, Array, NULL)

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Help Needed: How to Use the Nhooja Himalayan Bank Payment Plugin’ is closed to new replies.