razorpay / razorpay/razorpay-node
Broken Promises Flow
Open
@rzpamidi is already working on this.
Since Oct 24, 2017.
enhancement
- Dominant language
- JavaScript
- Stars
- 243
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
Different behaviour has been noted with the promise returned, when a callback is passed to the api function.
eg.
const instance = new Razorpay({
key_id: 'rzp_test_2mYdwI91aUdL2u',
key_secret: 'hd0FgTKnZUUJCGYHTdfQ6Zx2'
});
instance.payments.all({})
.then((arg) => console.log(arg)) // arg value is printed
.catch(arg => console.log(arg))
instance.payments.all({}, function () {
console.log(arguments); // arguments are printed
}).then((arg) => console.log(arg)) // arg value is undefined
.catch(arg => console.log(arg))
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.
Assessment
This issue has not been assessed yet.