Giter Site home page Giter Site logo

studybuffalo / django-helcim Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 5.0 6.02 MB

A Django-based integration with the Helcim Commerce API

License: GNU General Public License v3.0

Python 89.32% HTML 8.33% JavaScript 2.17% Shell 0.19%
django django-oscar helcim

django-helcim's Introduction

django-helcim

PyPI_ PyPI - Python Version PyPI - Django Version License_

Travis-CI build status_ Codecov code coverage_

This package provides a Django-based integration with the Helcim Commerce API. It is designed to be easily implemented with existing Django-based commerce platforms and comes with an optional module to connect with Django Oscar.

Getting Started

Instructions on installing and configuration can be found on Read The Docs.

Support

The docs provide examples for setup and common issues to be aware of. If the issue involves connecting this package to Django Oscar, this repository contains a sandbox environment you can review for a minimal working example. For any other issues, you can submit a GitHub Issue.

Contributing

Contributions are welcome, especially to address bugs and extend functionality. Full details on contributing can be found in the docs.

Versioning

This package uses a MAJOR.MINOR.PATCH versioning, as outlined at Semantic Versioning 2.0.0.

Authors

Joshua Robert Torrance (StudyBuffalo)

License

This project is licensed under the GPLv3. Please see the LICENSE file for details.

Acknowledgements

Thanks to the django-oscar-paypal developers, from which many of this packages design decisions are based.

Changelog

You can view all package changes on the docs.

django-helcim's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar qsaiqkhxsa avatar robotbuffalo avatar studybuffalo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

django-helcim's Issues

helcim.com offline

For about a day I have watched https://www.helcim.com and secure.myhelcim.com are offline. I havent seen any news about the company/service falling over/shutting down, but then the news is a bit preoccupied atm.

Add tests for the Sandbox site

To ensure the sandbox site keeps up with package updates it would be helpful to have tests to cover the main functionality.

ImportError: cannot import name 'url' from 'django.conf.urls'

I have Django 4.2.1 installed. In the urls.py inside the helcim folder, the ImportError: cannot import name 'url' from 'django.conf.urls occurs because django.conf.urls.url() has been deprecated and removed in version 4 of Django. To solve this import error, I used the re_path() method instead which is from django.urls.re_path()

Unpin Django-Oscar Version

Django Oscar currently making use of a pre-release version of django-haystack. Do not want to enable pre-releases in this fashion given potential for untested bugs. Will pin to django-oscar 2.0.z for now and will unpin when this dependency is no longer an issue.

Response field not in FROM_API_FIELDS: csrfmiddlewaretoken

I am trying to integrate Helcim Payment Method in django, i have written all the logic to make the payment, when i open up the page page, fill in my cards detail and amount to be paid and hit the submit button, it shows processing then refresh the page, then in the terminal i got this error that says Response field not in FROM_API_FIELDS: csrfmiddlewaretoken.

I know this error is related to a csrf issue, i have added csrf_token to my form and even added csrf_exempt to the View but the error keeps showing up, i would really appreciate it if i can get some guide on what to look for or do concerning this issue.

This is the view to process the payment


@method_decorator(csrf_exempt, name='dispatch')
class HelcimJSPaymentView(HelcimJSMixin, FormView):
    form_class = HelcimjsPaymentForm
    success_url = 'example:complete'
    template_name = 'core/example_app/helcimjs_payment_details.html'

    def get_success_url(self, **kwargs): # pylint: disable=arguments-differ
        """Returns the success URL."""
        return reverse_lazy(self.success_url, kwargs=kwargs)

    def post(self, request, *args, **kwargs):
        """Handles remaining processing after Helcim.js processing."""
        response = HelcimJSResponse(
            response=request.POST, save_token=True, django_user=request.user
        )

        if response.is_valid():
            # NOTE: the type of transaction made by Helcim.js is determined by
            # the Helcim.js configuration. You will need to decide on the
            # proper "record" method to use for your situation.
            transaction, token = response.record_purchase()

            # NOTE: you generally wouldn't want to transmit these
            # details as query parameters; this is just done to
            # simplify this sandbox example
            url = '{}?transaction_type={}&transaction={}&token={}'.format(
                self.get_success_url(),
                'helcimjs',
                transaction.id,
                token.id,
            )
            return HttpResponseRedirect(url)

        # Invalid form submission/payment - render payment details again
        # TODO: add some basic initial data to the form
        form = self.get_form()

        return self.form_invalid(form)

Dependabot can't evaluate your Python dependency files

Dependabot can't evaluate your Python dependency files.

As a result, Dependabot couldn't check whether any of your dependencies are out-of-date.

The error Dependabot encountered was:

Illformed requirement ["==3.8.2pytest-cov==2.6.0"]

You can mention @dependabot in the comments below to contact the Dependabot team.

Contributing Documentation Missing config.env Details

Sandbox site requires the addition of a config.env file in the root directory of the sandbox. Documentation does not make reference to this anywhere and you will get an error trying to run the sandbox without it. Will need to update the docs to include this detail as well as adding a template of the .env file to streamline the process.

Standardize Helcim response time zone

Helcim API responses appear to use PST/PDT in date/time fields. Try and standardize this to the database timezone settings.

Could add a default setting to specify this and allow users to update it should the timezone be user-location specific.

Improve templates

Templates are currently very minimal. Considerations

  • Improve UI and accessibility
  • Look at easy way to integrate with sites base template
  • Add easy navigation from detail/delete views back to main view
  • Consider adding small dashboard

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.