fix(donate): re-enable monthly donations and update plans

This commit is contained in:
Ahmad Abdolsaheb
2020-03-20 21:29:32 +03:00
committed by mrugesh
parent a7c70ddcd8
commit b561599614
2 changed files with 22 additions and 10 deletions

View File

@ -131,7 +131,7 @@ class MinimalDonateForm extends Component {
<Row>
<Col lg={8} lgOffset={2} sm={10} smOffset={1} xs={12}>
<Spacer />
<b>Confirm your donation of $60 / year with PayPal:</b>
<b>Confirm your donation of $5 / year with PayPal:</b>
<Spacer />
<PaypalButton
donationAmount={donationAmount}
@ -151,7 +151,7 @@ class MinimalDonateForm extends Component {
donationAmount={donationAmount}
donationDuration={donationDuration}
getDonationButtonLabel={() =>
`Confirm your donation of $60 / year`
`Confirm your donation of $5 / year`
}
handleProcessing={handleProcessing}
/>

View File

@ -4,26 +4,26 @@ require('dotenv').config({ path: path.resolve(__dirname, '../.env') });
// Configuration for client side
const durationsConfig = {
year: 'yearly',
// month: 'monthly', // We have disabled montly payments
month: 'monthly',
onetime: 'one-time'
};
const amountsConfig = {
year: [100000, 25000, 6000],
month: [5000, 3500, 500],
month: [25000, 3500, 500],
onetime: [100000, 25000, 6000]
};
const defaultAmount = {
year: 6000,
year: 25000,
month: 3500,
onetime: 25000
};
const defaultStateConfig = {
donationAmount: defaultAmount['year'],
donationDuration: 'year'
donationAmount: defaultAmount['month'],
donationDuration: 'month'
};
const modalDefaultStateConfig = {
donationAmount: 6000,
donationDuration: 'year'
donationAmount: 500,
donationDuration: 'month'
};
// Configuration for server side
@ -36,7 +36,7 @@ const donationSubscriptionConfig = {
},
plans: {
year: [100000, 25000, 6000],
month: [5000, 3500, 500]
month: [25000, 3500, 500]
}
};
@ -46,6 +46,12 @@ const paypalConfigTypes = {
month: {
'500': {
planId: 'P-1L11422374370240ULZKX3PA'
},
'3500': {
planId: 'P-1L11422374370240ULZKX3PA'
},
'25000': {
planId: 'P-1L11422374370240ULZKX3PA'
}
},
year: {
@ -64,6 +70,12 @@ const paypalConfigTypes = {
month: {
'500': {
planId: 'P-37N14480BW163382FLZYPVMA'
},
'3500': {
planId: 'P-3E678937P5715503NLZZTRVY'
},
'25000': {
planId: 'P-97K80194AU368022JLZ2Q27Y'
}
},
year: {