payment actions

This commit is contained in:
mahdavi 2024-07-14 16:46:36 +03:30
parent d1eaaa25bd
commit 1d0fe5803a
2 changed files with 3 additions and 2 deletions

View file

@ -12,11 +12,11 @@
{{ object.state }} {{ object.state }}
{{ StateChoices.CREATED }} {{ StateChoices.CREATED }}
{% csrf_token %} {% csrf_token %}
{% if object.state == StateChoices.CREATED %} {% if object.state == StateChoices.CREATED and object.payer == request.user %}
<div class="col-6 mb-3"> <div class="col-6 mb-3">
<input class="w-100 btn btn-primary btn" type="submit" value="پرداخت" name="pay"/> <input class="w-100 btn btn-primary btn" type="submit" value="پرداخت" name="pay"/>
</div> </div>
{% elif object.state == StateChoices.DELAYED %} {% elif object.state == StateChoices.DELAYED and object.payer == request.user%}
<div class="col-6 mb-3"> <div class="col-6 mb-3">
<input class="w-100 btn btn-primary btn" type="submit" value="تایید پرداخت" name="receipt"/> <input class="w-100 btn btn-primary btn" type="submit" value="تایید پرداخت" name="receipt"/>
</div> </div>

View file

@ -50,6 +50,7 @@ INSTALLED_APPS = [
'jalali_date', 'jalali_date',
# local apps # local apps
'apps.core',
'apps.users', 'apps.users',
'apps.wallet', 'apps.wallet',
'apps.gooyal_oauth2', 'apps.gooyal_oauth2',