Coder Social home page Coder Social logo

zeit-labs / ecommerce-payfort Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 59 KB

Amazon Payment Services (PayFort) Payment Processor backend for Open edX ecommerce

License: GNU Affero General Public License v3.0

Makefile 1.12% Python 89.94% HTML 5.75% Shell 3.20%

ecommerce-payfort's Introduction

Amazon Payment Services (PayFort) Payment Processor backend for Open edX ecommerce

This application provides a custom Open edX ecommerce <https://github.com/edx/ecommerce/> payment processor backend for the Amazon Payment Services.

Getting Started with PayFort Integration Development

The API documentation for the PayFort payment services is available at:

Scroll through the page, it's a very long single-page documentation.

There's no official Python SDK for PayFort. But we can use the PayFort PHP SDK to understand the API calls and redirect mechanism.

There's a 2016 unofficial Python SDK for PayFort: https://github.com/alisterionold/payfort-python

There's a 2018 blog documenting the integration process:

Testing Credit Cards

When the testing account is used, PayFort test payment card numbers can be used.

Development and Testing

To run tests locally in your machine, you need to install the following dependencies:

$ pip install tox

Then run the all tests:

$ make tests

Or run the unit tests only:

$ make unit_tests

To run quality quality:

$ make quality

tox can be used directly to run a specific, for example:

$ tox -e py38 -- tests/unit/test_payfort_utils.py

Tutor Devstack Installation Instructions

You need to have Tutor requirements such as Docker.

Run the following commands:

cd ~/work/
sudo pip install tutor==13.3.2
mkdir payfort && cd payfort
git clone [email protected]:Zeit-Labs/ecommerce-payfort.git
git clone --branch=open-release/maple.nelp [email protected]:eduNEXT/ecommerce.git
git clone --branch=nelp/maple [email protected]:eduNEXT/tutor-discovery discovery
bash ecommerce-payfort/tutor_plugin/tutor_quickstart.sh

Installation and usage

  • Install this repository inside the ecommerce virtualenv environment using pip.

  • In ecommerce.yml, add the following settings:

    ADDL_INSTALLED_APPS:
      - payfort
    ADDL_PAYMENT_PROCESSORS:
      - 'ecommerce_payfort.processors.PayFort'
    # many other settings
    PAYMENT_PROCESSOR_CONFIG:
      <partner name>:
        payfort:
          <TBD: integration docs is coming>
    
  • Restart the ecommerce service in production and the devserver in the devstack.

  • In the ecommerce Django admin site, create waffle switches payment_processor_active_payfort, ` to enable the backends.

  • Verify and ensure that the enable_client_side_checkout waffle flag is disabled for everyone.

  • Once these steps are done, the PayFort processor backend provided by this application will be available as payment options during the payment flow for purchasing paid seats in courses.

Author

This application was developed by ZeitLabs at the request of The National Learning Center.

This application is released under the terms of the AGPLv3 license and is based on the ecommmerce-hyperpay plugin.

ecommerce-payfort's People

Contributors

omarithawi avatar shadinaif avatar

ecommerce-payfort's Issues

UX: Payment succeeded page takes a long time

Payment succeeded. Processing enrollment.. please wait..
For your reference, the payment ID is: ECOMMERCE-169996200016165749

Takes too long to load. Is it mandatory to wait that much? Or is it by design.

I recommend adding a load meter and a note It takes 30 seconds to load, don't close blah blah ....

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.