parent
63699581c8
commit
7207527052
2 changed files with 50 additions and 0 deletions
@ -0,0 +1,20 @@ |
||||
{% extends "templates/lilcity/index.html" %} {% load static %} |
||||
|
||||
{% block content %} |
||||
test_ok<br> |
||||
{{ test_ok }}<br> |
||||
transaction.status<br> |
||||
{{ transaction.status }}<br> |
||||
transaction.reason<br> |
||||
{{ transaction.reason }}<br> |
||||
<h3>request.META</h3><br> |
||||
{{ request.META.HTTP_HOST }} |
||||
{{ request.META.HTTP_REFERER }} |
||||
<hr> |
||||
<h3>request.GET</h3><br> |
||||
{{ request.GET }} |
||||
<hr> |
||||
<h3>request.POST</h3><br> |
||||
{{ request.POST }} |
||||
<hr> |
||||
{% endblock content %} |
||||
@ -0,0 +1,30 @@ |
||||
{% extends "templates/lilcity/index.html" %} {% load static %} |
||||
|
||||
{% block head %} |
||||
<script src="https://widget.cloudpayments.ru/bundles/cloudpayments"></script> |
||||
{% endblock head %} |
||||
|
||||
{% block content %} |
||||
<button class="btn" id="pay_btn">Pay</button> |
||||
{% endblock content %} |
||||
|
||||
{% block foot_js %} |
||||
<script> |
||||
document.getElementById('pay_btn').onclick = function() { |
||||
var widget = new cp.CloudPayments(); |
||||
widget.charge({ // options |
||||
publicId: 'pk_9ae020cd5fed74499dee247067d17', //id из личного кабинета |
||||
description: 'Пример оплаты (деньги сниматься не будут)', //назначение |
||||
amount: 1, //сумма |
||||
currency: 'RUB', //валюта |
||||
invoiceId: '{{ invoice_id }}', //номер заказа (необязательно) |
||||
// accountId: 'user@example.com', //идентификатор плательщика (необязательно) |
||||
data: { |
||||
test: true //произвольный набор параметров |
||||
} |
||||
}, |
||||
"{% url 'cloud_payments_callback_test' %}?invoice_id={{ invoice_id }}", |
||||
"{% url 'cloud_payments_callback_test' %}?invoice_id={{ invoice_id }}"); |
||||
} |
||||
</script> |
||||
{% endblock foot_js %} |
||||
Loading…
Reference in new issue