From af009a0bb37093e908e8be1159c0cda6fe837e5a Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Tue, 3 Jan 2023 12:23:25 -0800 Subject: [PATCH] Updates to Sentry & removal of Stripe. --- client/package.json | 8 +- client/src/components/_test/paymentMethod.jsx | 49 +----- .../accounting-payments-table.component.jsx | 5 - .../job-payments/job-payments.component.jsx | 19 --- .../payment-form/payment-form.component.jsx | 60 +------ .../payment-modal/payment-modal.container.jsx | 90 +---------- .../payment-list-paginated.component.jsx | 19 --- client/src/index.js | 14 +- .../pages/manage/manage.page.component.jsx | 18 +-- .../mobile-payment.component.jsx | 150 +++++++++--------- .../mobile-payment.container.jsx | 42 ++--- client/yarn.lock | 116 +++++++------- 12 files changed, 181 insertions(+), 409 deletions(-) diff --git a/client/package.json b/client/package.json index c6eda0caa..0d61af0eb 100644 --- a/client/package.json +++ b/client/package.json @@ -9,11 +9,9 @@ "@craco/craco": "^6.4.5", "@fingerprintjs/fingerprintjs": "^3.3.3", "@jsreport/browser-client": "^3.1.0", - "@sentry/react": "^7.7.0", - "@sentry/tracing": "^7.7.0", + "@sentry/react": "^7.28.1", + "@sentry/tracing": "^7.28.1", "@splitsoftware/splitio-react": "^1.6.0", - "@stripe/react-stripe-js": "^1.9.0", - "@stripe/stripe-js": "^1.32.0", "@tanem/react-nprogress": "^5.0.8", "antd": "^4.22.3", "apollo-link-logger": "^2.0.0", @@ -119,7 +117,7 @@ "react-error-overlay": "6.0.9" }, "devDependencies": { - "@sentry/webpack-plugin": "^1.19.0", + "@sentry/webpack-plugin": "^1.20.0", "@testing-library/cypress": "^8.0.3", "cypress": "^10.3.1", "eslint-plugin-cypress": "^2.12.1", diff --git a/client/src/components/_test/paymentMethod.jsx b/client/src/components/_test/paymentMethod.jsx index c90fef0a7..8e722cc0b 100644 --- a/client/src/components/_test/paymentMethod.jsx +++ b/client/src/components/_test/paymentMethod.jsx @@ -1,8 +1,4 @@ -import { - PaymentRequestButtonElement, - useStripe, -} from "@stripe/react-stripe-js"; -import React, { useEffect, useState } from "react"; +import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { logImEXEvent } from "../../firebase/firebase.utils"; @@ -19,49 +15,6 @@ const mapDispatchToProps = (dispatch) => ({ }); function Test({ bodyshop, setEmailOptions }) { - const stripe = useStripe(); - - const [paymentRequest, setPaymentRequest] = useState(null); - useEffect(() => { - if (stripe) { - const pr = stripe.paymentRequest({ - country: "CA", - displayItems: [{ label: "Deductible", amount: 1099 }], - currency: "cad", - total: { - label: "Demo total", - amount: 1099, - }, - requestPayerName: true, - requestPayerEmail: true, - }); - - // Check the availability of the Payment Request API. - pr.canMakePayment().then((result) => { - if (result) { - setPaymentRequest(pr); - } else { - // var details = { - // total: { label: "", amount: { currency: "CAD", value: "0.00" } }, - // }; - new PaymentRequest( - [{ supportedMethods: ["basic-card"] }], - {} - // details - ).show(); - } - }); - } - }, [stripe]); - - if (paymentRequest) { - return ( -
- -
- ); - } - return (