Skip to content

Commit b770036

Browse files
committed
Added stripe wrapper
1 parent a431fdd commit b770036

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

src/donationComponents/DonationPage.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import React from "react";
44
import { loadStripe } from "@stripe/stripe-js";
55
import type { Stripe } from "@stripe/stripe-js";
6+
import { Elements } from "@stripe/react-stripe-js";
67
import { DisplayBox, ExportLink, Loading } from "@churchapps/apphelper";
78
import { DonationForm, RecurringDonations, PaymentMethods } from "@churchapps/apphelper-donations";
89
import { ApiHelper, DateHelper, UniqueIdHelper, CurrencyHelper, Locale } from "../helpers";
@@ -248,15 +249,17 @@ export const DonationPage: React.FC<Props> = (props) => {
248249
else {
249250
return (
250251
<>
251-
<DonationForm
252-
person={person}
253-
customerId={customerId}
254-
paymentMethods={paymentMethods}
255-
stripePromise={stripePromise}
256-
donationSuccess={handleDataUpdate}
257-
church={props?.church}
258-
churchLogo={props?.churchLogo}
259-
/>
252+
<Elements stripe={stripePromise}>
253+
<DonationForm
254+
person={person}
255+
customerId={customerId}
256+
paymentMethods={paymentMethods}
257+
stripePromise={stripePromise}
258+
donationSuccess={handleDataUpdate}
259+
church={props?.church}
260+
churchLogo={props?.churchLogo}
261+
/>
262+
</Elements>
260263
<DisplayBox headerIcon="payments" headerText={Locale.label("donation.donationPage.donations")} editContent={getEditContent()}>
261264
{getTable()}
262265
</DisplayBox>

0 commit comments

Comments
 (0)