Skip to content

Commit

Permalink
Merge pull request #10 from tulimaki/migration-update-managers
Browse files Browse the repository at this point in the history
Updates towards Shuup 0.5.0 and Django 1.9+ support (SH-91)
  • Loading branch information
Pikkupomo authored Sep 26, 2016
2 parents 9a63ff1 + 3fdc258 commit 80c2d70
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 8 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
shuup_setup_utils = None


VERSION = '0.5.0'
VERSION = '0.5.1'

TOPDIR = os.path.abspath(os.path.dirname(__file__))
VERSION_FILE = os.path.join(TOPDIR, 'shuup_checkoutfi', '_version.py')
Expand Down
26 changes: 26 additions & 0 deletions shuup_checkoutfi/migrations/0002_update_managers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-22 23:00
from __future__ import unicode_literals

from django.db import migrations
import django.db.models.manager


class Migration(migrations.Migration):

dependencies = [
('shuup_checkoutfi', '0001_initial'),
]

operations = [
migrations.AlterModelOptions(
name='checkoutfipaymentprocessor',
options={'verbose_name': 'Checkout.fi payment processor'},
),
migrations.AlterModelManagers(
name='checkoutfipaymentprocessor',
managers=[
('_default_manager', django.db.models.manager.Manager()),
],
),
]
14 changes: 7 additions & 7 deletions shuup_checkoutfi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ def _get_checkout_object(self, service):
def process_payment_return_request(self, service, order, request):
checkout = self._get_checkout_object(service)
fields = {
"version": request.REQUEST.get("VERSION"),
"order_number": request.REQUEST.get("STAMP"),
"order_reference": request.REQUEST.get("REFERENCE"),
"payment": request.REQUEST.get("PAYMENT"),
"status": request.REQUEST.get("STATUS"),
"algorithm": request.REQUEST.get("ALGORITHM"),
"mac": request.REQUEST.get("MAC"),
"version": request.GET.get("VERSION"),
"order_number": request.GET.get("STAMP"),
"order_reference": request.GET.get("REFERENCE"),
"payment": request.GET.get("PAYMENT"),
"status": request.GET.get("STATUS"),
"algorithm": request.GET.get("ALGORITHM"),
"mac": request.GET.get("MAC"),
}

if not all(fields.values()):
Expand Down

0 comments on commit 80c2d70

Please sign in to comment.