diff --git a/apps/web/components/apps/paypal/Setup.tsx b/apps/web/components/apps/paypal/Setup.tsx index 4feb59bc10..5163464c63 100644 --- a/apps/web/components/apps/paypal/Setup.tsx +++ b/apps/web/components/apps/paypal/Setup.tsx @@ -15,10 +15,17 @@ export default function PayPalSetup() { const [newSecretKey, setNewSecretKey] = useState(""); const router = useRouter(); const { t } = useLocale(); - const integrations = trpc.viewer.apps.integrations.useQuery({ variant: "payment", appId: "paypal" }); + + const integrations = trpc.viewer.apps.integrations.useQuery({ + variant: "payment", + appId: "paypal", + }); + const [paypalPaymentAppCredentials] = integrations.data?.items || []; const [credentialId] = paypalPaymentAppCredentials?.userCredentialIds || [-1]; + const showContent = !!integrations.data && integrations.isSuccess && !!credentialId; + const saveKeysMutation = trpc.viewer.apps.updateAppCredentials.useMutation({ onSuccess: () => { showToast(t("keys_have_been_saved"), "success"); @@ -39,12 +46,13 @@ export default function PayPalSetup() {
Paypal
+{t("paypal")}
Getting started with Paypal APP
-- Here in Cal.com we offer Paypal as one of our payment gateway. You can use your own Paypal - Business account to receive payments from your customers enabling and setting up price and - currency for each of your event types. -
+{t("paypal_getting_started")}
+ +{t("paypal_description")}
-
Resources:
+{t("resources")}
+ - Link to Paypal developer API REST Setup Guide: - https://developer.paypal.com/api/rest/#link-getclientidandclientsecret + {t("paypal_rest_setup_guide")} -Setup instructions
-- Remember to only proceed with the following steps if your account has already been upgraded to - a business account. Also keep in mind that some of the following steps might be different - since Paypal offers different experiences based on your country. -
+{t("paypal_setup_instructions")}
+ +{t("paypal_setup_note")}
- Our integration creates a specific webhook on your Paypal account that we use to report back - transactions to our system. If you delete this webhook, we will not be able to report back and - you should Uninstall and Install the app again for this to work again. Uninstalling the app - won't delete your current event type price/currency configuration but you would not be - able to receive bookings. + {t("reminder")}:
+ +{t("paypal_webhook_reminder")}