limegrow / ingenico-m2-payments

2 stars 15 forks source link

Timeout POST webhook #22

Open kylianleemkuil opened 3 years ago

kylianleemkuil commented 3 years ago

Hello,

We have a problem that when a order is done and a customer doesn't wait to get back to our website page that the order stays on "Pending". I contacted Ingenico and normally it would send a POST SALE request to our webhook that the order is paid and that the order status has to change to "Processing". Now I see in the ingenico dashboard it says that our POST SALE to the webhook gives a REQUEST TIMEOUT: 10000: postsale timout

when I go to the webhook link it results in a white page how can I check if the webhook is working properly, is there maybe a selftest api endpoint for to check if its working properly?

olegisk commented 3 years ago

Hello @kylianleemkuil I guess it could problems with server configuration. Even google can't provide guarantee for 100% availability. Btw do you have this problem with other orders? Can you ensure that webhook url was entered correctly in the Ingenico BO?

kylianleemkuil commented 3 years ago

Hello @olegisk

Thanks for the quick reply. Every order gives a "REQUEST TIMEOUT: 10000" with no "ONLINE RESPONSE:". But only orders that don't wait to get back to our "Thank you page" will get this problem because on the "Thank you page" the payment is also captured and status changed.

I checked multiple times and I filled it in correctly: image image

olegisk commented 3 years ago

@kylianleemkuil Please check logs in var/log/ingenico.log. There should we such logs like:

[2021-08-10 04:03:28] ing.DEBUG: Incoming POST: 
{"orderID":"4000000382","currency":"EUR","amount":"38.16","PM":"Belfius Direct Net","ACCEPTANCE":"","STATUS":"9","CARDNO":"","ED":"","CN":"Otto Hell","TRXDATE":"08/10/21","PAYID":"3136545632","PAYIDSUB":"0","NCERROR":"0","BRAND":"Belfius Direct Net","CREDITDEBIT":"","IPCTY":"RU","CCCTY":"BE","ECI":"5","CVCCheck":"","AAVCheck":"","VC":"","AAVZIP":"NO","AAVADDRESS":"NO","AAVNAME":"NO","AAVPHONE":"NO","AAVMAIL":"NO","SCORING":"","SCO_CATEGORY":"","IP":"77.87.82.154"} []
[2021-08-10 04:03:35] ing.DEBUG: WebHook: Success. OrderID: 4000000382. Status: 9 [] []

It means WebHook was ok. Do you have something similar?

kylianleemkuil commented 3 years ago

@olegisk Ah I see it indeed gives an Validation error: [2021-08-20 12:02:11] ing.DEBUG: WebHook: Error: WebHook: Validation failed [] []

How can this be fixed?

olegisk commented 3 years ago

@kylianleemkuil You can check these parameters in the Ingenico BO: Technical information->Transaction feedback, SHA-OUT pass phrase Technical information->Data and origin verification, SHA-IN pass phrase fields. Those fields must be the same password which you generated in the Magento module.

kylianleemkuil commented 3 years ago

@olegisk Just checked and those keys are all the same in the Magento module and also in Ingenico BO.

We have 3 store views Dutch, French, and I see in the logs that for 2 the store views it gives the error WebHook: Error: WebHook: Validation failed

and for the German store view it gives: WebHook: Success. OrderID: 000023889. Status: 9 [] []

Should I maybe try to generate a new password?

olegisk commented 3 years ago

@kylianleemkuil Yes, you can try

kylianleemkuil commented 3 years ago

Hello @olegisk ,

Sorry for the late reply I was on vacation, I just tried it and still after I updated the pass phrases in the backoffice and in Magento: [2021-09-03 09:23:25] ing.DEBUG: WebHook: Error: WebHook: Validation failed [] [] Its really weird because the latest store view I added from Germany is working properly