【问题标题】:cashfree payment gateway intergration in reactjsreact js中的无现金支付网关集成
【发布时间】:2022-06-14 12:52:02
【问题描述】:

我在我的网站上使用无现金支付网关,它工作正常,但我不知道如何获得无现金交易的响应,我使用重定向链接是 https://payments-test.cashfree.com/order/orderToken 打开无现金用户界面,请帮助我我的代码在这里...


import React from 'react';
import { useState, useEffect } from 'react';
import { connect } from "react-redux";
import { cash_data } from "../../../../store/Action/UserFatchData";
import { dropinComponents } from "./dropinComponents.js";

const Cashfree1 = ({ dispatch, res }) => {
  const [orderToken, setOrderToken] = useState("3D3S3KLoiTRp9lVwzUvo");
  const [components, setComponents] = useState([]);

  const [payment, setpayment] = useState({
    order_id: "4158",
    order_amount: 15.00,
    order_currency: "INR",
    order_note: "Additional order info",
    customer_details: {
      customer_id: "12345",
      customer_email: "abc@cashfree.com",
      customer_phone: "9816512345"
    }
  })


  useEffect(() => {
    let comp = []
    dropinComponents.map((name, index) => {
      return (
        comp.push(name.id)
      )
    })
    setComponents(comp)
    // dispatch(cash_data(payment))
    window.location.href = "https://payments-test.cashfree.com/order/#3D3S3KLoiTRp9lVwzUvo"
  }, [])
  return (
    <>

    </>
  )
}

const mapStateToProps = (state) => ({
  res: state.Cash,
});

export default connect(mapStateToProps)(Cashfree1);

【问题讨论】:

  • 交易完成后会有回调函数检查支付网关的文档。

标签: reactjs redux payment-gateway cashfree


猜你喜欢
  • 2013-11-12
  • 2020-05-19
  • 2022-07-18
  • 2019-01-20
  • 2011-05-05
  • 2018-12-05
  • 1970-01-01
  • 2012-07-17
  • 2016-02-02
相关资源
最近更新 更多