jazzband / django-payments

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

DotPay - no changes in the payment status and returning to the store. #159

Closed maltitco closed 6 years ago

maltitco commented 6 years ago

I test payments by DotPay, i noticed that there is no return communication with the store to change the payment status. With the payment on the DotPay side successful, there is no redirection back to the store. The same is when the transaction is rejected.

Edit:

In django-payments/payments/dotpay/init.py file is def get_hidden_fields, which contains:

'type': '1'

Documentation of DotPay say (I'm sorry I'm not translating):

Parametr określający metodę odwołania do serwisu sprzedawcy. Wartość
parametru type ma wpływ na zachowanie parametru URL.
Dostępne wartości:

0 – Po dokonaniu płatności Kupującemu zostanie udostępniony przycisk
powrotu do serwisu sprzedawcy,

2 – Brak reakcji, nic nie jest wysyłane, brak przycisku (wartość domyślna).

4 – Nastąpi bezpośrednie przekierowanie do dostawcy kanału płatności
(np. Banku), jak również po dokonaniu płatności i wylogowaniu

It is possible to manage this parameter in the settings?

patrys commented 6 years ago

It could be that the API has changed. We could make it configurable but I think the most important thing is to change the default to something that is supported and is not 2.

maltitco commented 6 years ago

It seems to me that the standard should be 0.

I changed this value manually to '0', now after a successful or not successful payment process, there is a button that directs you to the store.

maarcingebala commented 6 years ago

@szymi- Does your PR #173 solve this issue?

maltitco commented 6 years ago

@elwoodxblues Yes the PR #173 solves this problem.

szymi- commented 6 years ago

Regarding redirection back to the store, changes from #171 introduce some more flexibility.