jazzband / django-payments

Universal payment handling for Django.
https://django-payments.readthedocs.io
Other
1.06k stars 282 forks source link

The problem with Chk in the dotpay payment #200

Open ArturLewinsky opened 6 years ago

ArturLewinsky commented 6 years ago

Hello, I am trying to integrate my django applications with dotpay payment systems, but I get a error in the logs:

Required Chk obtained, but hash not equal. Obtained Chk "None", but expected Chk "24729f200bc4a8cdc4d85475f46f101eaee4e4fc9842b1fdf9a38ae4075a3254

In the technical documentation of the operator, I read that the parameter should be calculated to proper work. However, in the library code I cant see where that is made. Does anyone solved the problem?

patrys commented 6 years ago

It could be that the API has changed since this gateway was implemented. I don't think we use it in any of our projects so I can't verify.

NyanKiyoshi commented 6 years ago

To make sure, @ArturLewinsky are you using the legacy version of the dotpay API and not the other one? (the other one is enabled by default, it's a settings to change on your dotpay account's dashboard)

cprn commented 6 years ago

Shouldn't there be chk parameter calculated in data dictionary? It isn't. https://github.com/mirumee/django-payments/blob/master/payments/dotpay/__init__.py I didn't look closely but that's the only place I see any of the Dotpay parameters mentioned. Even if there's a signature calculated somewhere else, can't where it's added to posted data.