Skip to content

Commit

Permalink
Load payment processors config from json string instead of dict (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
asadmanzoor93 authored May 29, 2021
1 parent 8fa3f16 commit df63b3c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'panel_notification_base_url',
'contact_mailing_address',
'theme_dir_name',
'oauth_clients'
'oauth2_clients'
]

EDLY_PANEL_WORKER_USER = 'edly_panel_worker'
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def setUp(self):
colors=dict(primary='#00000'),
platform_name='Edly',
theme_dir_name='st-lutherx-ecommerce',
oauth_clients={
oauth2_clients={
'payments-sso': {
'id': 'payments-sso-id',
'secret': 'payments-sso-secret',
Expand Down
3 changes: 2 additions & 1 deletion ecommerce/extensions/edly_ecommerce_app/helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.conf import settings

import jwt
import json
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _

Expand Down Expand Up @@ -226,6 +227,6 @@ def get_payment_processors_names(request_data):
Returns:
(str): Payment Processors Comma-separated List
"""
payment_processors = request_data.get('payment_processor_config', {})
payment_processors = json.loads(request_data.get('payment_processor_config', {}))
edly_slug = request_data.get('edly_slug', '')
return ','.join(payment_processors.get(edly_slug, {}).keys())
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def setUp(self):
colors=dict(primary='#00000'),
platform_name='Edly',
theme_dir_name='st-lutherx-ecommerce',
oauth_clients={
oauth2_clients={
'payments-sso': {
'id': 'payments-sso-id',
'secret': 'payments-sso-secret',
Expand Down

0 comments on commit df63b3c

Please sign in to comment.