Giter VIP home page Giter VIP logo

drupalpaypalrecurrringpayment's People

Contributors

fran avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

drupalpaypalrecurrringpayment's Issues

Define and setup the permissions

The basics are:

  • Manage plans (for the managers. alloe ABM plans)
  • Allow subscription (for the field. only prints if the rol has the perm)

Decopule user creation from the main module

The task of the main module is allow visitors subscribe to a paypal plan but what to do when the job is done should be tacked by contrib modules (or submodules in this case)

Make the module compatible with composer

  • The module needs to be able to be added as dependency on a project via composer require drupal/OURMODULE
  • The module itself needs a composer.json with "paypal/rest-api-sdk-php" as dependency.

Created plans are storing the current URL of the site

And this is a problem since I can install a new drupal with bar.com and if a plan been created at foo.com and I want use it at bar.com, the ok and ko URLs will be pointing to foo.com.

We need to check if the available plans should be filtered by site (from the drupal side) or if the plans (any plan) can be used on any site changing the URLs on the fly.

Add a response message or URL when the user agreed or cancelled the deal

Use case: The user approves or cancel the agreement at paypal. Paypal will return the response to static process urls BUT we need to decide what to do after the processing.

We need to add to the config area (/admin/config/system/paypal-sdk) the possibility to redirect a user to an url and optionally show a message.

Link the user to the apprved agreement.

Whe the user accepts the agreement we are processing the response at PaypalSDKController->processResponse()

We create a new account for the user if it does not exist or use an existing accound (we search it via the paypal's email matching).

BUT we are not persisting the agreement to use it at the user profile. Thats what we need to implement here.

Add a new setting option

To allow select between test and live.

And implement this code

   $this->apiContext->setConfig(
        array(
          'mode' => 'live',
        )
      );

Verify how to act if the plan changes.

Te plan changes and:

User cases:

  • The user is subscribed. What happend. His plan gets updated or supended (see paypal documentation)
  • The user is have a suspended subscription. What happend. His plan gets will be updated when it gets enabled or he/she must subscribe to a new plan? (see paypal documentation)

Add cache to paypal_subscribe_field_formatter

The url comes from BillingAgreement->getUserAgreementLink() and we should cache the api call since the link is always the sam (at plan level. If the plan is another one the link is different).

Check response [processResponse()]

For:

  • Anonymous but really existent user.
  • Anonymous but non existent user.
  • Logged in user.

And both 3 cases but with existing subscriptions (can be of the same plan or a different plan).

Make plan form more conditional

Review the form logic. for example If you select infinite "Plan type" then "Payment cycles" should not be shown as an option.

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.