1

When a click on Intent to Receive then it always showed me same like Intent to Received required, not showed 200 OK.

Method for ensuring_security is:

def ensuring_security?
      key = 'XERO_WEBHOOK_KEY'
      payload = request.body.read
      calculated_hmac = Base64.encode64(OpenSSL::HMAC.digest('sha256', key, payload))
      begin
        if calculated_hmac.strip() == request.headers['x-xero-signature']
          true
        else
          false
        end
      rescue JSON::ParserError => e
        false
      end
      
end

The result is alweays false because the calculated_hmac.strip() is not equal to request.headers['x-xero-signature']. I think if the intent can't be 200 OK so if I will updation in Contacts or Invoices the webhook can not be received. So What should I do?

I want to show a result of 200 OK and after this will get a webhook if updation in invoices and contacts.

0 Answers0