-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement SHA256 support, to work with newer Adyen merchant accounts. #24
Conversation
Hi @willharris, it's me again. I read carefully your PR, and I'm a bit confused by the use of However, what is clear is that we should provide a way to handle SHA256. As I said on your other PR #25 I would like first to implement a way in If you allow me, I'll work a bit more on the plugin internal structure, and see after that how we can implement new features and update the critical parts that is the security of the transactions. |
@@ -33,3 +37,6 @@ def get_skin_secret(self, request): | |||
|
|||
def get_ip_address_header(self): | |||
raise NotImplementedError | |||
|
|||
def get_hmac_algorithm(self, request): | |||
raise NotImplementedError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of the config for that. Good point to keep.
Hi again @Exirel. Regarding the gateway being dependent on the
But I absolutely understand wanting to keep the request out of the Shall I refactor to remove the request code from |
You pointed out an issue I have with the code too: why does the I mean... from the
Then in This design should help any developer (from plugin maintainer to plugin user) to handle specific cases in better way. What do you think of this proposal? |
After looking at the I don't think the |
Yep. This is something I struggle a bit with. To me, it makes sense to have, say, a Scaffold and a Gateway, or a Facade and a Gateway. But all 3 at the same time? I don't see why we need both Scaffold, Facade, and Gateway. I wasn't in the original discussions that lead to this design decision, so I assume there were good reasons for that. Today, all I can say is that:
My gut feeling would say that it's a bit of all these issues. 3 layers might be a bit over-engineered, but they also have a lot of dependencies, and it's not clear why both the Scaffold and the Facade rely on the Django There is something that needs to be addressed before we can really move things here and there. |
Do you have plans for resolving these issues? I am implementing a new shop with Adyen payment (and SHA256) and consider using this module. IMHO, the architecture could benefit from some cleanup. Personally, I find the structure of django-oscar-paypal (express checkout) much cleaner and would use this as guidance for refactoring / reorganizing this module. But maybe I am not seeing the whole picture... |
You're right, this module is too complex and not easy to extend. I'm more or less the maintainer "by default" on this project - I wasn't here at its creation and now I'm kind of alone at Oscaro to work on this. I can not make any promise for the future of this module. Oscaro is changing things internally, so I can not tell if this module will be maintained in the future. |
Thank you for the heads-up. Over the last few days I have implemented the module for my own needs based on the pull request of @willharris (because I needed SHA256) but I haven't made any structural changes. I still feel that I don't understand Adyen well enough yet to take it to the next level, but I certainly would prefer if this module would be maintained further. |
@willharris and @ckepper I got time to work on the topic. You may want to read #28 where I add the concept of "signer". I wanted to remove the "sign & verify" part from the payment form & payment return data objects, and to delegate that to another object, which is easier to configure and extend. I didn't wrote a SHA-256 implementation, but I think it's easy to do now with this new structure. If you don't mind, I'll close this PR for now. |
I will be happy to rebase if you merge PR #23, as I need both of them for my own site. ;-)