-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The idea is that we want to change certain configuration values based on the request. To get this working, we need to change the interface for the config class to pass the request to most of it's methods. To get the request object, we need to also alter the facade's and scaffold's interface to more often include the request. For this commit, I had a look at how data gets passed from e.g. Oscaro to the scaffold. Unfortunately I discovered an anti-pattern, where a lot of required data is passed in via an undocumented order_data dictionary. That needs to be cleaned up separately.
- Loading branch information
1 parent
b62b46e
commit a2cc103
Showing
6 changed files
with
54 additions
and
56 deletions.
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 |
---|---|---|
|
@@ -19,16 +19,16 @@ class AbstractAdyenConfig: | |
The base implementation for a config class. | ||
""" | ||
|
||
def get_identifier(self): | ||
def get_identifier(self, request): | ||
raise NotImplementedError | ||
|
||
def get_action_url(self): | ||
def get_action_url(self, request): | ||
raise NotImplementedError | ||
|
||
def get_skin_code(self): | ||
def get_skin_code(self, request): | ||
raise NotImplementedError | ||
|
||
def get_skin_secret(self): | ||
def get_skin_secret(self, request): | ||
raise NotImplementedError | ||
|
||
def get_ip_address_header(self): | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
maiksprenger
Author
Member
|
||
|
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
I would have factored
self.request = request
in an__init__(self, request)
, but if the functional style is consistent with how Oscar does things, why not.