razorpay / razorpay/razorpay-node
control flow
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 243
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
Prologue
#19 defines an existing problem where the promise chain is broken on concurrent control flow types (Promises and callbacks).
Problem
Implementing both of them at once is a design flaw and it should be noted that Node dictates a strict choice between the two. (Look at request and its accompanying request-promise catalogue.)
Solution
A simple callback adapter can be placed and since the world is moving on to Promises, it would make for a sensible default. Then, on initialization, the following can be passed in the options object:
const Razorpay = require( 'razorpay-sdk' );
const apiObject = new Razorpay( { controlFlow: 'callbacks' } );
Tags
Enhancements, broken, bugs
(Direct CC: @captn3m0)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading issue #19 and the referenced request/request-promise catalogue, then inspect the SDK initialization and its current promise and callback handling. Done means choosing Promises as the default while supporting an explicit controlFlow: 'callbacks' option through a callback adapter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100