Improved the way the PayPal integration works
This commit is contained in:
@@ -102,16 +102,13 @@ export default function Home({envVariables}: {envVariables: {[key: string]: stri
|
||||
</Layout>
|
||||
)}
|
||||
{(user.status === "paymentDue" || checkIfUserExpired()) && (
|
||||
<PayPalScriptProvider
|
||||
options={{
|
||||
clientId: envVariables["NEXT_PUBLIC_PAYPAL_CLIENT_ID"] || "",
|
||||
currency: "EUR",
|
||||
intent: "capture",
|
||||
commit: true,
|
||||
vault: true,
|
||||
}}>
|
||||
<PaymentDue hasExpired user={user} reload={router.reload} />
|
||||
</PayPalScriptProvider>
|
||||
<PaymentDue
|
||||
key={envVariables["NEXT_PUBLIC_PAYPAL_CLIENT_ID"]}
|
||||
hasExpired
|
||||
user={user}
|
||||
reload={router.reload}
|
||||
clientID={envVariables["NEXT_PUBLIC_PAYPAL_CLIENT_ID"] || ""}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user