fix(client): replace Stripe with PayPal (#41924)

* feat: remove stripe payment option from client

* feat: remove stripe completely

* fix: remove last Stripe remnants

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Ahmad Abdolsaheb
2021-05-03 11:45:23 +03:00
committed by GitHub
parent 23564eb732
commit 27c8d564e4
32 changed files with 95 additions and 908 deletions

View File

@@ -109,8 +109,6 @@ export const injectConditionalTags = (tagsArray, homeLocation) => {
export const getPostBodyComponents = pathname => {
let scripts = [];
const challengesPathRE = new RegExp('/learn/[^/]+/[^/]+/[^/]+/?$');
const donatePathRE = new RegExp('/donate/?$');
const mathJaxScriptElement = (
<script
async={false}
@@ -120,15 +118,6 @@ export const getPostBodyComponents = pathname => {
type='text/javascript'
/>
);
const stripeScriptElement = (
<script
async={true}
id='stripe-js'
key='stripe-js'
src='https://js.stripe.com/v3/'
type='text/javascript'
/>
);
if (
pathname.includes('/learn/coding-interview-prep/rosetta-code') ||
@@ -136,8 +125,6 @@ export const getPostBodyComponents = pathname => {
) {
scripts.push(mathJaxScriptElement);
}
if (challengesPathRE.test(pathname) || donatePathRE.test(pathname)) {
scripts.push(stripeScriptElement);
}
return scripts.filter(Boolean);
};