Skip to content
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

Support for TrInitiatorCode and PaymentScheduled parameters #2

Open
abel1502 opened this issue Nov 22, 2023 · 2 comments
Open

Support for TrInitiatorCode and PaymentScheduled parameters #2

abel1502 opened this issue Nov 22, 2023 · 2 comments

Comments

@abel1502
Copy link

As per the cloudpayments docs, some new headers have been added to the tokens endpoints, one of which is mandatory. (There may be more changed endpoints, but this is the one I'm concerned about). As far as I can tell, there is currently no way to specify those parameters via this library. Since it renders charging payments by tokens impossible, I believe this is a critical issue that deserves urgent attention. If there is a user-side solution I am missing, please inform me

@drforse
Copy link
Owner

drforse commented Nov 22, 2023

Hello. Thank you for opening the issue. This library is not currently actively maintained, but if you make the changes, test them and make the commit, I'll appreciate it. I think the change is simple, you just need to add there parameters in the CpTokensChargeAuthEndpoint class in aiocloudpayments/endpoints/payments/tokens/bases.py in snake_case, specifiying None as default value for the unrequired fields, and properly type-hinting the new fields. I could make the change rn, but rn I don't have enough time to test it, so I couldn't save it. Also you would need to change the version in aiocloudpayments/init.py to 0.1.2, I can make the changes myself and create a new branch for them and you could test it and send a feedback so that I can merge it into master and upload to pypi.

@abel1502
Copy link
Author

I've made the changes, however I'm afraid I cannot currently test them. My only potential testbed would be the production deployment of my project, and I'm not sure how to instruct its pipeline to install a package from git, not to mention the issues if it turns out not to work.

I'm also not sure if your code supports enum.IntEnums in models, so I used ints but defined the enumerations alongside. I hope you can find time to test it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants