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

Investigate to merge Charge.payment_successful on checkout request in RazorPay setup #101

Open
smirolo opened this issue Jun 29, 2016 · 0 comments
Labels
idea Idea to consider for potential enhancement

Comments

@smirolo
Copy link
Contributor

smirolo commented Jun 29, 2016

The flow to subscribe and pay for a plan is as follow:

  1. POST to /api/cart/
  2. GET /api/billing/:organization/checkout/
  3. compute the total amount to charge from the list of invoicables.
  4. POST to RazorPay
  5. POST /api/billing/:organization/checkout/ with {“processor_token”: token-returned-by-razorpay}
    This will call RazorpayBackend.create_charge_on_card to capture the total amount of invoicables.
  6. GET /api/billing/charges/:charge (:charge being return by the previous call as "processor_key")
    This will call Charge.payment_successful and create the Transaction in the database as well as switch Charge.state from "created" to “done".

RazorPay works somewhat differently from Stripe. The processor_token passed back by RazorPay is an actual charge id. The processor_token passed back by Stripe is a card id. It is quite possible that payment_successful could be called after razorpay.capture and make step #6 optional in RazorPay setup.

@smirolo smirolo added the idea Idea to consider for potential enhancement label Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Idea to consider for potential enhancement
Projects
None yet
Development

No branches or pull requests

1 participant