third try
This commit is contained in:
parent
13041dd63e
commit
2347618d05
@ -9,7 +9,7 @@ import PIL.Image
|
|||||||
import random
|
import random
|
||||||
|
|
||||||
from .models import User, ALKATOR_CHOICES_DICT
|
from .models import User, ALKATOR_CHOICES_DICT
|
||||||
from alkator.settings import COMGATE_MERCHANT, COMGATE_SECRET
|
from alkator.settings import COMGATE_MERCHANT, COMGATE_SECRET, COMGATE_TEST
|
||||||
|
|
||||||
|
|
||||||
@csrf_exempt
|
@csrf_exempt
|
||||||
@ -51,6 +51,7 @@ def register(request):
|
|||||||
|
|
||||||
payment_data = {
|
payment_data = {
|
||||||
'merchant': COMGATE_MERCHANT,
|
'merchant': COMGATE_MERCHANT,
|
||||||
|
'test': 'true' if COMGATE_TEST else 'false',
|
||||||
'price': 69000,
|
'price': 69000,
|
||||||
'curr': 'CZK',
|
'curr': 'CZK',
|
||||||
'method': 'ALL',
|
'method': 'ALL',
|
||||||
@ -59,7 +60,7 @@ def register(request):
|
|||||||
'fullName': f"{request.POST['first_name']} {request.POST['last_name']}",
|
'fullName': f"{request.POST['first_name']} {request.POST['last_name']}",
|
||||||
'refId': f'{user.id}',
|
'refId': f'{user.id}',
|
||||||
'secret': COMGATE_SECRET,
|
'secret': COMGATE_SECRET,
|
||||||
'prepareOnly': True,
|
'prepareOnly': 'true',
|
||||||
}
|
}
|
||||||
result = requests.post('https://payments.comgate.cz/v1.0/create', data=payment_data)
|
result = requests.post('https://payments.comgate.cz/v1.0/create', data=payment_data)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user