razorpay / razorpay/razorpay-node

Customer Already exists error

Open
#377 16 comments 0 reactions 1 assignee View on GitHub

@ankitdas13 is already working on this.

Since Dec 11, 2023.

question
Dominant language
JavaScript
Stars
243
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Steps to reproduce the behavior
  1. Use razorpay-node v2.9.2
  2. Run the below code snippet more than once
  3. See that it works ok the first time and throws error after that
  4. Now downgrade razorpay-node to v2.8.6
  5. And repeat step 2
  6. See no errors are occuring
Expected behavior

If customer with similar data already exists, their data should be returned when fail_existing is set to 0.

Actual behavior

Error is thrown when customer is similar data already exists.

Code snippets
razorpayInstance.customers.create({
  name: "",
  contact: request.phone_number,
  fail_existing: 0,
});
Node version

Node v18.17.1

Library version

razorpay v2.9.2

Additional Information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.