An error occured while initiating transaction Error: Hashes do not match! at Paynow.parse


#21

What i am trying to access is if you can actually receive a Html post on your result url . Have you sent yourself a post to the result url and were able to verify you received it ?


#22

@Harvey
You can try post anything. I am using Postman, both urls are working on my side


#23

@k1muza apologies for taking long I was trying to look through your transaction records. For integration ID-*622 , the last transaction we saw was on the 2nd of January.
Here is a successful Post to your server -->

January 2nd 2020, 11:34:17.727 IntegrationID: 8622 :: Sending to http://18.217.49.123:8080/update:
reference=Invoice%202343
paynowreference=5858966
amount=0.50
status=Paid
pollurl=https://www.paynow.co.zw/Interface/CheckPayment/?guid=2a0a06db-ee2e-4042-9ba6-cd8c762f6f64

For the same id here is a failed post to your server.–>
January 2nd 2020, 11:34:18.310 IntegrationID: 8622 :: The remote server returned an error: (404) Not Found.

Please carry out another test and let me know , I want to verify whether if we are sending a response from
server-side


#24

I have tested using my IP address of the day “13.59.170.167”
http://13.59.170.167:8080/payment/ecocash
Unfortunately there’s still nothing after the transaction. I am receiving the texts and transactions are completing but none of my urls return or result are posted on to confirm that.


#25

@k1muza below is the Post Paynow tried to send you and the response.

where you are listening : http://13.59.170.167:8080/payment/ecocash
where Paynow is posting : http://13.59.170.167:8080/update:

POST
January 13th 2020, 15:58:17.786 , IntegrationID: 8622 : Sending to http://13.59.170.167:8080/update:

reference=Invoice%202343
paynowreference=6012457
amount=0.50
status=Paid
pollurl=https://www.paynow.co.zw/Interface/CheckPayment/?guid=1368ca45-f8aa-4333-aadb-8a3ccf6ced85

RESPONSE
January 13th 2020, 15:58:18.362 IntegrationID: 8622 : The remote server returned an error: (404) Not Found…


#26

Yes I was listening to the wrong endpoint. Thanks so much for pointing that out. I think this issue is resolved.


#27

Good day all. It seems this issue was resolved for my account alone. I updated the code with a different account and integration keys, I am getting the “Hashes do not match” error again/ Lemme know how I can share the integration keys so you can test and help me


#28

@k1muza , can you please check for spaces and make sure you copied the credentials correctly. As for sharing keys, the best I can do is point you to this test scenario Invalid Hash When Initiating a RemoteTransaction


#29

Thanks for the response. I don’t think that is going to help much, because the system is working fine except the time i switch between integration keys. So deductively the issue is in the new integration key, not so much on the code. I will just need to give u my integration key and ID.

Maybe you can contact me on 0774684534 on WhatsApp. I can give you the key and ID and we test.


#30

@k1muza generate another new key and test it. Let me know how it goes


#31

I generated new keys. But on testing with the code below. I got the same error:

app.post("/checkout", async function(req, res, next) {

const ref = new Date().getTime();

const payment = paynow.createPayment(`Invoice ${ref}`, '[email protected]');

payment.add("Oranges", 30);
payment.add("Bread", 15);

try {
    const response = await paynow.sendMobile(payment, '0771111111', 'ecocash');
    if (response && response.success) {
      res.json(response)
    } else {
      res.json(response);
    }
} catch (e) {
  res.json(e);
    }
});