Giter VIP home page Giter VIP logo

cashfree-pg-sdk-nodejs's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cashfree-pg-sdk-nodejs's Issues

Issues after installing cashfree-pg-sdk-nodejs package

Error after installing the package and building the application:

image

Request Package has been deprecated.

I Installed the Request Package. It lead to another error related to crypto.

image

Crypto package is also deprecated.

Any solution for this? Can we do without using the request package?

I am trying to implement the payment for individual methods using this package. Could you please provide a way to solve this issue?

upi id error testing api

body: {
message: 'upi_id for sandbox should be testsuccess@gocash or testfailure@gocash or testtpvsuccess@gocash or testtpvfail@gocash or success@upi',
code: 'upi_id_invalid',
type: 'invalid_request_error'
},

and i use
var cfUpi = new CFUPI();
cfUpi.channel = CFUPI.ChannelEnum.Collect;
cfUpi.upiId = "success@upi";
var cFUPIPayment = new CFUPIPayment();
cFUPIPayment.upi = cfUpi;
var cFOrderPayRequest = new CFOrderPayRequest();
cFOrderPayRequest.paymentSessionId = payment_session_id;
cFOrderPayRequest.paymentMethod = cFUPIPayment;
var apiInstance = new CFPaymentGateway();
var cfPayResponse = await apiInstance.orderSessionsPay(
cfConfig,
cFOrderPayRequest
);
if (cfPayResponse != null) {
console.log(
"Order ID:",
cfPayResponse?.cfOrderPayResponse?.data.orderId
);
console.log(
"Payment Response:",
cfPayResponse?.cfOrderPayResponse?.data
);
console.log("Headers:", cfPayResponse?.cfHeaders);
return reply.send({
status: "success",
data: cfPayResponse?.cfOrderPayResponse?.data,
});
} else {
throw new Error("Payment failed");
}
} catch (error) {

paymentSessionId is undefiend

payment session id is undefiend

paymentSessionId: undefined,

this code : const userId = request.user?.["_id"];
const { mobile, email, amount, name } = request.body;
const customerDetails = new CFCustomerDetails();
customerDetails.customerId = userId;
customerDetails.customerPhone = mobile;
customerDetails.customerEmail = email;
customerDetails.customerName = name;
const orderTags = {};
orderTags["order_tag_01"] = "TESTING IT";
const cFOrderRequest = new CFOrderRequest();
cFOrderRequest.orderAmount = amount;
cFOrderRequest.orderCurrency = "INR";
cFOrderRequest.customerDetails = customerDetails;
cFOrderRequest.orderTags = orderTags;

    const apiInstance = new CFPaymentGateway();
    const result = await apiInstance.orderCreate(cfConfig, cFOrderRequest);

    if (result != null) {
      console.log(result?.cfOrder?.paymentSessionId);
      console.log(result?.cfOrder?.orderId);
      console.log(result?.cfHeaders);
      console.log(result);
      reply.send(result);
    }

card details wrong

body: {
message: 'invalid value for parameter: card_cvv',
code: 'card_cvv_invalid',
type: 'invalid_request_error'
},

wrong details and i submit
{
"cardNumber": 4706131211212123,
"cardCvv": 123,
"cardExpiryMm": "03",
"cardExpiryYy": "2028"
}

upi issue testing

body: {
message: 'invalid value for parameter: upi_id',
code: 'upi_id_invalid',
type: 'invalid_request_error'
},
statusCode: 400

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.