rename CoinfyCallback model to CoinifyAPICallback

This commit is contained in:
Thomas Steen Rasmussen 2016-05-29 19:33:26 +02:00
parent daab6c4019
commit 59a66107bb
3 changed files with 4 additions and 3 deletions

View file

@ -5,7 +5,7 @@ from . import models
admin.site.register(models.EpayCallback) admin.site.register(models.EpayCallback)
admin.site.register(models.EpayPayment) admin.site.register(models.EpayPayment)
admin.site.register(models.CoinifyAPIInvoice) admin.site.register(models.CoinifyAPIInvoice)
admin.site.register(models.CoinifyCallback) admin.site.register(models.CoinifyAPICallback)
admin.site.register(models.Invoice) admin.site.register(models.Invoice)
@admin.register(models.ProductCategory) @admin.register(models.ProductCategory)

View file

@ -269,7 +269,7 @@ class CoinifyAPIInvoice(CreatedUpdatedModel):
order = models.OneToOneField('shop.Order') order = models.OneToOneField('shop.Order')
class CoinifyCallback(CreatedUpdatedModel): class CoinifyAPICallback(CreatedUpdatedModel):
headers = JSONField() headers = JSONField()
payload = JSONField() payload = JSONField()
order = models.ForeignKey('shop.Order') order = models.ForeignKey('shop.Order')

View file

@ -26,6 +26,7 @@ from shop.models import (
EpayCallback, EpayCallback,
EpayPayment, EpayPayment,
CoinifyAPIInvoice, CoinifyAPIInvoice,
CoinifyAPICallback,
) )
from .forms import AddToOrderForm from .forms import AddToOrderForm
from .epay import calculate_epay_hash, validate_epay_callback from .epay import calculate_epay_hash, validate_epay_callback
@ -397,7 +398,7 @@ class CoinifyCallbackView(SingleObjectMixin, View):
headerdict[key[5:]] = value headerdict[key[5:]] = value
# save callback to db # save callback to db
callbackobject = CoinifyCallback.objects.create( callbackobject = CoinifyAPICallback.objects.create(
headers=json.dumps(headerdict), headers=json.dumps(headerdict),
payload=request.body, payload=request.body,
order=self.get_object() order=self.get_object()