This repository has been archived by the owner on Aug 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
233 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,3 +116,4 @@ db.py | |
/ebiznes/uploads/* | ||
public/ | ||
email.py | ||
payu.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 2.2.8 on 2019-12-07 11:34 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django.utils.timezone | ||
import model_utils.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('service', '0017_auto_20191128_2045'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Order', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('totalAmount', models.CharField(max_length=50)), | ||
('order_id', models.CharField(max_length=255)), | ||
('status', models.CharField(choices=[('PENDING', 'W trakcie'), ('SUCCESS', 'Udane'), ('FAILURE', 'Nie udane')], max_length=40)), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<div id="Payment"> | ||
<b-loading :active.sync="isLoading"/> | ||
<button type="button" @click="startPayment"></button> | ||
</div> | ||
</template> | ||
<script> | ||
import axios from 'axios'; | ||
export default { | ||
name: 'Payment', | ||
data () { | ||
return { | ||
rent: {}, | ||
isLoading: false, | ||
} | ||
}, | ||
methods: { | ||
startPayment: function() { | ||
this.isLoading = true; | ||
const { id } = this.$route.params; | ||
axios.post(`/api/services/payment/create/${id}/`) | ||
.then(({ data }) => { | ||
this.isLoading = false; | ||
window.open(data.redirectURI, '_self') | ||
}) | ||
.catch(error => { | ||
this.isLoading = false; | ||
this.$toastr.e(error.response.data) | ||
}) | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PAYU_CLIENT_ID = '' | ||
PAYU_CLIENT_SECRET = '' | ||
PAYU_POS_ID = '' | ||
PAYU_OAUTH_URL = '' | ||
PAYU_ORDER_URL = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<h1>Twoje zamowienie zostalo zakonczone</h1> | ||
<p>Ponizej znajduje sie link do platnosci elektroniczne</p> | ||
<p>Prosimy o jak najszybsza wplate</p> | ||
|
||
<a href="{% url 'payment' pk=pk %}">Link do zaplaty</a> | ||
|
||
<footer> | ||
<p>Zespol ServiceRent</p> | ||
</footer> | ||
</body> | ||
</html> |