Support » Plugin: 2C2P Redirect API for WooCommerce » integration problem

  • Resolved sushil37


    i’m trying to integrate this payment system on my “wordpress woocommerce website” which is located in the country Nepal. Himalayan Bank limited introduced this payment system for the first time in Nepal. i found a plugin in the wordpress repository named “2C2P Redirect API for WooCommerce”.which i beleive is developed by you. when i installed this plugin and change the forms submit url from “” to “” as provided by the himalayn bank’s integration documentation, i get this error “Sorry, your payment cannot be processed.Invalid Payment Info. (ER001)” which is an data format error. Are’nt the data format used by the plugin or simply 2p2c’s API and the API provided to us by Himalayan bank same? If not, then what are the values that i have to change in order to make the API provided by the himalayan bank work. Himalayan bank is not willing to help in this situation so im hoping to get some help from your side to make the plugin work.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter sushil37


    documentation provided by the bank are as follows:-

    Preparing and sending payment request message using HTTP
    form post

    <Form method=”post” action=>
    <input type=”text” id=”paymentGatewayID” name=”paymentGatewayID” value=”234”/>
    <input type=”text” id=”invoiceNo” name=”invoiceNo” value=”00000001234567890333”/>
    <input type=”text” id=”productDesc” name=”productDesc” value=”Test Product”/>
    <input type=”text” id=”amount” name=”amount” value=”000000010000”/>
    <input type=”text” id=”currencyCode” name=”currencyCode” value=”764”/>
    <input type=”text” id=”userDefined1” name=”userDefined1” value=”custom data”/>
    <input type=”text” id=”nonSecure” name=”nonSecure” value=”Y”/>
    <input type=”text” id=”hashValue” name=”hashValue”

    5. Hashing
    In order to have data integrity and to identify the correct source of the request and
    response, merchant needs to send hash value together in the request and HBL
    PGW returns the hash value in the response.

    Hash value is computed using HMACSHA256 algorithm with merchant secret key
    (provided by HBL to merchant).
    HashValue = merchantID + invoiceNumber
    + amount + currencyCode + nonSecure

    Sample code:

    Hashing function in PHP

    $signData = hash_hmac(‘SHA256′, “signatureString”,’SecretKey’, false);
    $signData = strtoupper($signData);
    echo urlencode($signData);

    Plugin Author 2c2p


    hello sushil37,

    HBL payment gateway and 2C2P Redirect APIs are not the same. and currently we do not support HBL Payment Gateway in this plugin. You may have to modify the plugin on your own if you want to use for HBL.

    hey @sushil37
    did you manage to integrate HBL? I need to do it too.

    hey @sushil37
    did you manage to integrate HBL? I need to do it too.

    @kcanil89 I might be able to help you. Send me a message on FB

    It would be great if anyone who has completed or integrated HBL payment gateway posts some code samples? I am trying to integrate this as well.

    Thank you!

    @shreyans @kcanil89

    I have successfully integrated HBL+Woocommerce. Let me know if you guys need help.

    Hello @sakarbhusal,
    Can you please share some codes or documentations some where? Will be truly helpful for developers like us in future.

    For now can you please explain how to check test payment? I am developing it as well.

    Thank you.

    Thread Starter sushil37


    email me “” if u still got any problems! I’ve sucessfull integrated it few months back and its running smoothly without any errors.

    For those who are having problems, I have integrated successfully and wrote a blog here

    Might be helpful for other developers.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘integration problem’ is closed to new replies.