ONDC-Official / reference-implementations

ONDC reference apps
MIT License
27 stars 67 forks source link

Golang SDK(encryption and decryption) not decrypting correct response sent by ONDC server #76

Open bmarwaha-godaddy opened 3 months ago

bmarwaha-godaddy commented 3 months ago

Hi

I am in bit of situation. I am trying to use Golang module for encryption and decryption. I borrowed the code from GOLANG utility.

I deployed a server and ondc is making a call back to my subscribe endpoint and sending me a challenge string. I decrypt the challenge string and write response back. But ondc fails with

{
    "message": {
        "ack": {
            "status": "NACK"
        }
    },
    "error": {
        "type": "CORE-ERROR",
        "code": "131",
        "path": null,
        "message": "https://comedia.in/on_subscribe : Encryption verification is failed"
    }
}

This should not be happening as this is pretty straighforward. I mailed ondc team about it and response I got from them was "Golang module has worked for others".. I am wondering if I can get quick help

Challenge I got from ONDC : JCpy7xxSd2K2GIHG31hCP4ijwkOKbPuNdJvJCANQwkHxoi6uoaw7Wp3zjLr5xp3Q Response I sent : {"answer":"i cannot paste this!"}