Skip to content

Commit

Permalink
Merge branch 'develop' into feature/fix-ts-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitb35 committed Jan 4, 2023
2 parents e942990 + 428569b commit 3fed9af
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 72 deletions.
96 changes: 33 additions & 63 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@material-ui/core": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.57",
"@next/bundle-analyzer": "^10.1.3",
"@paypal/react-paypal-js": "^7.5.0",
"@paypal/react-paypal-js": "^7.8.2",
"@sentry/browser": "^6.2.5",
"@sentry/integrations": "^6.2.5",
"@sentry/node": "^6.2.5",
Expand Down
3 changes: 2 additions & 1 deletion public/locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"thankyouHeaderText": "Wir sind auf dem Weg zu einer \n <h1>Billion Bäume</h1>.",
"donationFailed": "Spende fehlgeschlagen",
"donationFailedMessage": "Beim Abschluss deiner Zahlung ist etwas schief gelaufen. Wenn du weiterhin Probleme hast, kontaktiere uns bitte unter [email protected].",
"paypalPaymentError": "Leider haben wir bei PayPal Zahlungen aktuell vereinzelt Probleme. Bitte versuchen Sie es erneut mit einer anderen Zahlart. Vielen Dank für Ihre Unterstützung und Ihr Verständnis. Wir arbeiten an der Problemlösung.",
"donationPending": "Abschließen deiner Spende",
"donationPendingMessage": "Wir warten derzeit auf die Bestätigung von deiner Bank. Dies kann einige Zeit dauern, daher kannst du diese Seite auch schließen. Wir werden dir den Beleg in Kürze per E-Mail zusenden.",
"transactionId": "Transaktions-ID",
Expand Down Expand Up @@ -175,4 +176,4 @@
"planetCashIUnderstand": "Ich verstehe, dass PlanetCash Spenden/Zahlungen nicht zurückerstattet werden können, und dass nicht zugewiesene Zahlungen nach sechs Monaten automatisch Projekten auf der Plattform zugewiesen werden.",
"createPlanetCashAccount": "PlanetCash Konto erstellen",
"myContributionIsPartOfThat": "Und meine Spende ist Teil davon."
}
}
3 changes: 2 additions & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"thankyouHeaderText": "We're on the road to a \n <h1>Trillion Trees</h1>.",
"donationFailed": "Donation Failed",
"donationFailedMessage": "Something went wrong while completing your payment. If you continue having issues please reach out to us at [email protected]",
"paypalPaymentError": "Unfortunately, we are currently experiencing isolated problems with PayPal payments. Please try again with another payment method. Thank you for your support and understanding. We are working on solving the problem.",
"donationPending": "Completing your donation",
"donationPendingMessage": "We are currently waiting for the confirmation from your bank. This might take some time so, please feel free to close this page. We’ll send your receipt via email shortly.",
"transactionId": "Transaction ID",
Expand Down Expand Up @@ -175,4 +176,4 @@
"planetCashIUnderstand": "I understand that PlanetCash donation/payments are non-refundable, and unallocated payments will be auto allocated to projects on the Platform after six months of Payment.",
"createPlanetCashAccount": "Create PlanetCash Account",
"myContributionIsPartOfThat": "And my contribution is a part of that."
}
}
3 changes: 2 additions & 1 deletion public/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"thankyouHeaderText": "Estamos en el camino hacia una \n <h1>Trillón de árboles</h1>",
"donationFailed": "Donación fallida",
"donationFailedMessage": "Algo ha ido mal al completar el pago. Si sigue teniendo problemas, póngase en contacto con nosotros en [email protected]",
"paypalPaymentError": "Lamentablemente, estamos experimentando problemas con los pagos de PayPal. Por favor, inténtelo de nuevo con otro método de pago. Gracias por su apoyo y comprensión. Estamos trabajando en una solución al problema.",
"donationPending": "Completar su donación",
"donationPendingMessage": "Actualmente estamos esperando la confirmación de su banco. Esto puede llevar algún tiempo, así que no dude en cerrar esta página. En breve le enviaremos su recibo por correo electrónico.",
"transactionId": "Ref. de la donación",
Expand Down Expand Up @@ -105,4 +106,4 @@
"dedicatedTo": "Dedicado a",
"message": "Mensaje",
"contributedToTpo": "He aportado {{amount}} a {{organization}}"
}
}
7 changes: 4 additions & 3 deletions src/Donations/PaymentMethods/NewPaypal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { ReactElement, Dispatch, SetStateAction } from "react";
import { useTranslation } from "next-i18next";
import {
PayPalScriptProvider,
PayPalButtons,
Expand Down Expand Up @@ -39,6 +40,7 @@ function NewPaypal({
payDonationFunction,
setPaymentError,
}: Props): ReactElement {
const { t } = useTranslation("common");
const initialOptions = {
"client-id": paymentSetup?.gateways.paypal.authorization.client_id,
"enable-funding": "venmo",
Expand Down Expand Up @@ -85,9 +87,8 @@ function NewPaypal({
}

const onError = (data: Record<string, unknown>): void => {
setPaymentError(`Your order failed due to some error.`);

// This function shows a transaction success message to your buyer.
setPaymentError(t("paypalPaymentError"));
// This function shows a transaction error message to your buyer.
const _data: Readonly<PaypalErrorData> = {
...data,
type: "sdk",
Expand Down
4 changes: 2 additions & 2 deletions src/Utils/countriesData.json
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,8 @@
{
"countryName": "Croatia (Hrvatska)",
"countryCode": "HR",
"currencyName": "Croatian Dinar",
"currencyCode": "HRK",
"currencyName": "Euros",
"currencyCode": "EUR",
"currencyCountryFlag": "HR",
"languageCode": "en"
},
Expand Down

0 comments on commit 3fed9af

Please sign in to comment.